HTML Area Tag Hreflang Attribute defines the language of the target resource or webpage to which the area is linked via HTML Area Tag Href Attribute.
The HTML Area Tag Hreflang Attribute is used only if the Href Attribute is also used because if there is no targeted resource or webpage then how can there be a language of targeted resource or webpage.
Note: For HTML 5 the Hreflang is a new attribute for Area Tag.
Syntax of HTML Area Tag Hreflang Attribute
<area hreflang="language_code">
HTML Area Tag Hreflang Attribute Values
HTML Area Hreflang Attribute Value | Output |
language_code | This is a2 letter language code that defines the language of the resource or webpage linked or targeted in the href attribute.
Language codes can be found in our ISO Language Code Reference |
Example of HTML Area Tag Hreflang Attribute
HTML Area Tag Hreflang Attribute Code | Output |
<p>Click on the shapes to watch them:</p> <img src=" HTMLAreaTagEx.gif" alt="Shapes" usemap="#shapemap" width="145" height="126"> <map name="shapemap"> <area shape="circle" coords="25,30,12" href="Circle.jpg" hreflang =”en” target=_blank> <area shape="circle" coords="72,35,10" href="triangle.jpg" hreflang =”en” target=_blank > <area shape="circle" coords="115,35,10" href="star.jpg" hreflang =”en” target=_blank > </map> |
Click on the shapes to watch them: |
Here in the above example for HTML area Hreflang attribute we have provided the language code values to the hreflang attribute. These language code values define the language of the linked resource.
HTML Area Tag Hreflang Attribute Supporting Browsers
S. No. | Browser | Supported(Yes/No) |
1 | Internet Explorer | Yes |
2 | Firefox | Yes |
3 | Google Chrome | Yes |
4 | Opera | Yes |
5 | Safari | Yes |