IT. Expert System.

HTML

area


Tag Description

The area tag is used to define an area inside an image-map. An image-map is an image with clickable areas.

The area element is always nested inside a <map> tag.

Note: The usemap attribute in the <img> tag is associated with the <map> element's name attribute, and creates a relationship between the image and the map.

This tag has the form:

<area
  alt="text"
  coords="coordinates"
  href="URL"
  shape="{ circle | default | poly | rect }"
  target="{ _blank | _parent | _self | _top | framename }"
/>  

HTML5 and HTML4.01 Differences

HTML5 added some new attributes, and some HTML4.01 attributes are no longer supported.

HTML5   = New for HTML5

Attributes

Attribute Value Description
alt text Specifies an alternate text for the area. Required if the href attribute is present

Note: Use ONLY if the href attribute is present
coords coordinates Specifies the coordinates for the clickable area
downloadHTML5 filename Specifies that the target will be downloaded when a user clicks on the hyperlink
href URL Specifies the destination of a link in an area
hreflangHTML5 lang_code Specifies the base language of the target URL

Use only if the href attribute is present
mediaHTML5 media query Specifies what media / device the target URL is optimized for.
Use only if the href attribute is present (default = all)
nohref nohref Specifies that an area has no associated link
HTML4: supported in html4.01
HTML5: not supported in html5
relHTML5 alternate
author
bookmark
help
license
next
nofollow
noreferrer
prefetch
prev
search
tag
Specifies the relationship between the current document and the target URL. Use only if the href attribute is present
shape default
rect
circle
poly
Specifies the shape of an area
target _blank
_parent
_self
_top
framename
Specifies where to open the linked document. Use only if the href attribute is present
  • _blank - the target URL will open in a new window
  • _self - the target URL will open in the same document as it was clicked
  • _parent - the target URL will open in the parent document
  • _top - the target URL will open in the full body of the window
typeHTML5 media_type Specifies the MIME (Multipurpose Internet Mail Extensions) type of the target URL. Use only if the href attribute is present

Global Attributes

This tag also supports the HTML Global Attributes.

Event Attributes

This tag also supports the HTML Event Attributes.

Examples

The following example shows the basic use of this tag:

<img src ="shapes.gif" width="150" height="80" alt="Shapes" usemap ="#shapemap" />
<map name="shapemap">
  <area shape="rect" coords="0,0,50,50" href="circle.htm" alt="Circle Shape" />
  <area shape="rect" coords="50,0,50,50" href="square.htm" alt="Square Shape" />
  <area shape="rect" coords="100,0,50,50" href="triangle.htm" alt="Triangle Shape" />
</map>

Browser Support

Chrome Firefox IE Safari Opera

Doctype Declaration Support

The following table lists the doctype declarations this element may appear in:

HTML4.01 / XHTML1.0 XHTML 1.1 HTML 5
Traditional Strict Frameset

Miscellaneous Information

Defined In: HTML 3.2
Empty Tag: Yes


Content

Android Reference

Java basics

Java Enterprise Edition (EE)

Java Standard Edition (SE)

SQL

HTML

PHP

CSS

Java Script

MYSQL

JQUERY

VBS

REGEX

C

C++

C#

Design patterns

RFC (standard status)

RFC (proposed standard status)

RFC (draft standard status)

RFC (informational status)

RFC (experimental status)

RFC (best current practice status)

RFC (historic status)

RFC (unknown status)

IT dictionary

License.
All information of this service is derived from the free sources and is provided solely in the form of quotations. This service provides information and interfaces solely for the familiarization (not ownership) and under the "as is" condition.
Copyright 2016 © ELTASK.COM. All rights reserved.
Site is optimized for mobile devices.
Downloads: 6422 / 248533401. Delta: 0.01928 с