Tag <area> HTML Reference



Example

An image-map, with clickable areas:

<map name="planetmap">
  <area shape="rect" coords="0,0,82,126" href="sun.htm" alt="Sun" />
  <area shape="circle" coords="90,58,3" href="mercur.htm" alt="Mercury" />
  <area shape="circle" coords="124,58,8" href="venus.htm" alt="Venus" />
</map>

Browser Support

Internet Explorer Firefox Opera Google Chrome Safari

1. Definition and Usage

The <area> tag defines 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.


2. Differences Between HTML 4.01 and HTML5

HTML5 has some new attributes, and some HTML 4.01 attributes are no longer supported.


3. Differences Between HTML and XHTML

In HTML the <area> tag has no end tag.

In XHTML the <area> tag must be properly closed.


4. Required Attributes

DTD indicates in which HTML 4.01/XHTML 1.0 DTD the attribute is allowed. S=Strict, T=Transitional, and F=Frameset.

Attribute Value Description DTD
alt text Specifies an alternate text for an area STF

5. Optional Attributes

Attribute Value Description DTD
coords coordinates Specifies the coordinates of an area STF
href URL Specifies the hyperlink target for the area STF
nohref nohref Specifies that an area has no associated link STF
shape default
rect
circle
poly
Specifies the shape of an area STF
target _blank
_parent
_self
_top
Specifies where to open the linked page specified in the href attribute TF

6. Standard Attributes

The <area> tag supports the Standard Attributes in HTML.


7. Event Attributes

The <area> tag also supports the Standard Event Attributes in HTML.


Relative articles