HTML <area>Tag
Examples
An image map with clickable areas:
<img src="planets.gif" width="145" height="126" alt="Planets" usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" alt="Sun" href="sun.htm">
<area shape="circle" coords="90,58,3" alt="Mercury" href="mercur.htm">
<area shape="circle" coords="124,58,8" alt="Venus" href="venus.htm">
</map>
Try it Yourself »
Browser Support
![]()
All major browsers support the <area> tag.
Tag Definition and Usage Instructions
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 the <map> tag.
Note: <img>The usemap attribute in the tag is associated with<map>the name in the element.
Differences between HTML 4.01 and HTML5
HTML5 provides some new attributes, and no longer supports certain attributes from HTML 4.01.
Differences between HTML and XHTML
In HTML, the <area> tag has no closing tag.
In XHTML, the <area> tag must be properly closed.
Attributes
New: New in HTML5.
| Attribute | Value | Description |
|---|---|---|
| alt | text | Specifies the alternative text for the area. Required if the href attribute is used. |
| coords | coordinates | Specifies the coordinates of the area. |
| href | URL | Specifies the target URL of the area. |
| hreflangNew | language_code | Specifies the language of the target URL. |
| mediaNew | media query | Specifies for which media/device the target URL is optimized. Default: all. |
| nohref | value | Not supported in HTML5.Specifies an area with no related link. |
| relNew | alternate author bookmark help license next nofollow noreferrer prefetch prev search tag |
Specifies the relationship between the current document and the target URL. |
| shape |
default rect circle poly |
Specifies the shape of the area. |
| target | _blank _parent _self _top framename |
Specifies where to open the target URL. |
| typeNew | MIME_type | Specifies the MIME type of the target URL. Note: MIME = Multipurpose Internet Mail Extensions. |
Global Attributes
The <area> tag supportsHTML Global Attributes。
Event Attributes
The <area> tag supportsHTML Event Attributes。
Related Articles
HTML DOM Reference Manual:Area Object
Other Extensions