Description

The <area> tag defines a hot-spot region on an image, and associates it with a hypertext link. This element is used only within a <map> element.

The following table summarizes the usages context and the version history of this tag.

Parent:<map>
Content:None. It is an empty element.
Start/ End Tag:Start tag: required, End tag: forbidden
Version:HTML 2, 3.2, 4, 4.01, 5

Syntax

The basic syntax of the <area> tag is given with:

HTML/XHTML: <area code="URL" width="length" height="length"> ... </area>

Note: In HTML, the end tag for the <area> tag is forbidden. In XHTML, the <area> tag must be closed with a trailing slash, like this: <area /> . See empty elements.

The example below shows the <area> tag in action.

<img src="shapes.png" usemap="#shapes" alt="Geometrical Shapes">
<map name="shapes">
    <area shape="circle" coords="40,40,40" href="circle.html" alt="Circle">
    <area shape="poly" coords="148,2,104,80,193,80" href="triangle.html" alt="Triangle">
    <area shape="rect" coords="226,2,323,80" href="rectangle.html" alt="Rectangle">
    <area shape="poly" coords="392,2,352,32,366,80,418,80,432,32" href="pentagon.html" alt="Pentagon">
</map>                       

Tag-Specific Attributes

The following table shows the attributes that are specific to the <area> tag.

Global Attributes

Like all other HTML tags, the <area> tag supports the global attributes in HTML5.

Event Attributes

The <area> tag also supports the event attributes in HTML5.

Browser Compatibility

Element
<area>YeYesYesYesYes