HTML <area> hrefAttribute
Examples
Image map with clickable areas:
<img src="planets.gif.html"
width="145" height="126"
alt="Planets"
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm.html" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm.html" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm.html" alt="Venus">
</map>
usemap="#planetmap">
<map name="planetmap">
<area shape="rect" coords="0,0,82,126" href="sun.htm.html" alt="Sun">
<area shape="circle" coords="90,58,3" href="mercur.htm.html" alt="Mercury">
<area shape="circle" coords="124,58,8" href="venus.htm.html" alt="Venus">
</map>
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the href attribute.
Definition and Usage
The href attribute specifies the target of the link in the area.
If the href attribute is not used, the <area> tag is not a link.
Differences Between HTML 4.01 and HTML5
In HTML5, the <area> tag no longer uses the href attribute; it uses placeholder to specify the link.
Syntax
<area href="URL.html">
Attribute Values
| Value | Description |
|---|---|
| URL | The URL of the link. Possible values:
|
Other Extensions
HTML <area> Tag