Note/Info:
The <area> tag has no end tag in HTML5.
HTML5 <area> tag
The <area> tag defines a clickable area as a hotspot inside an image-map where the user can click.
You must place the <area> tag inside the <map> tag.
Syntax:
<img usemap=”mapid” src=”imagepath”>
<map name=”mapid”>
<area shape=”type” coords=”points” href=”hyperlink” >
</map>
Example
<map name="SocialMedia"> <area shape="rect" coords="0,0,82,126" alt="Facebook" href="https://www.facebook.com/"> <area shape="circle" coords="124,58,8"alt="Telegram" href="https://web.telegram.org/#/login"> </map>
CSS Default Value
display:none
How Browser will display
BLOCK Level.
Difference between HTML4.01, XHTML and HTML5
HTML4 | XHTML | HTML5 |
---|---|---|
HTML4.01 does not support some outdated attributes. | <area> tag must have a trailing slash as <area/> to mark the end of the tag | HTML5 contains some new attributes. It does not support some old attributes of HTML4.01 |
Attributes used with <area> tag
Attribute | Description |
---|---|
shape | It describes shape of the area. The values which shape can take are- |
coords | It sets the size and position of the shape attribute by using the coordinates. |
href | It defines the target hyperlink using a URL. |
alt | When browser is not able to load the image or the hyperlink then it is an alternative text should which will be displayed to the user. It is a good practice to add this attribute when you code the href attribute. |
download | It enables the target link as a download link to download the target object. Safari, IE and Opera Version 12 and prior does not support this attribute. |
hreflang | It defines language code of linked URL. |
media | This attribute is new in HTML5. It defines the media or device for which the target URL is created. It uses media query. |
nohref | Informs the browser that a particular area does not have a target link URL. (HTML5 does not support this attribute). |
type | Sets the type of media for the target URL. |
rel | This relates the current HTML document with the target link URL. This can take the following values - |
target | This informs the browser how to open the target URL. |
Note/Warning/Danger/Info/Success Normally, the shape and coords attributes are always coded together. rel="noreferrer" and rel="nofollow" tells the search engine crawler not to follow and refer the target link.
This means, it does not pass link juice to the target URL. Link Juice heps in increasing the SEO of a HTML document.
This tells the browser that the current HTML document does not value the target URL so search engine like Google will consider the target link like a paid link.
This means, it does not pass link juice to the target URL. Link Juice heps in increasing the SEO of a HTML document.
This tells the browser that the current HTML document does not value the target URL so search engine like Google will consider the target link like a paid link.
Global Attributes
The <area> tag supports Global Attributes.
Event Attributes
The <area> tag supports Event Attributes.
Supporting Browsers
Related Tags
<map> tag.