HTML <area> hreflangAttribute

HTML area 标签参考手册HTML <area> Tag

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" alt="Sun"
href="sun.htm.html" hreflang="en">
</map>

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the hreflang attribute.


Definition and Usage

The hreflang attribute specifies the language of the linked document.

The hreflang attribute can only be specified when the href attribute is used.

Note: This attribute is purely advisory.


Differences Between HTML 4.01 and HTML5

The hreflang attribute is a new attribute in the HTML5 <area> tag.


Syntax

<area hreflang="language_code">

Attribute Values

Value Description
language_code A two-character language code that specifies the language of the linked document.
To view all available language codes, visit ourLanguage Code Reference。


HTML area 标签参考手册HTML <area> Tag

Other Extensions