HTML Tag: area
A region of an image map. Used in conjunction with map
to map links to certain areas of an image.
area
has no content and therefore does not warrant a closing tag.
Optional Attributes
Attribute | Description | Possible values |
---|---|---|
alt |
Alternative text for when images aren’t available. Required if the href attribute is present. |
Text. |
shape |
The area’s shape. |
|
coords |
The pixel coordinates of the area and its shape. |
|
href |
Target destination the area links to. | URL. |
rel |
Used with href . The relationship between the link’s page and the link’s target destination. |
|
hreflang |
Used with href . The language of the target of the link. |
Language code, such as en (English) or es (Spanish). |
type |
Used with href . The MIME type of the linked resource. |
Text. |
download |
Used with href . Indicates that the link target should be downloaded instead of navigated to. |
None. |
target |
Used with href . The browsing context in which the target destination should open. |
|
Global attributes |
Example
<map name="atlas">
<area shape="rect" coords="0,0,115,90" href ="northamerica.html" alt="North America">
<area shape="poly" coords="113,39,187,21,180,72,141,77,117,86" href="europe.html" alt="Europe">
<area shape="poly" coords="119,80,162,82,175,102,183,102,175,148,122,146" href="africa.html" alt="Africa">
</map>