English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

HTML Reference Manual

HTML Tag大全

HTML: <area> hreflang Attribute

The hreflang attribute specifies the language of the target URL within the region. This attribute is only used when the href attribute is set

 HTML <area> tag

Online Example

Image Map with Clickable Areas:

<!DOCTYPE html>
<html>
<title>HTML:<area> hreflang Attribute - Basic Tutorial Website oldtoolbag.com</title>
<body>
<p>Click the sun to view it up close</p>
<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.html" hreflang="en">
</map>
</body>
</html>
Test to see ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All major browsers support the hreflang attribute.

Definition and Usage

The hreflang attribute specifies the language of the target URL in the area.
Use this attribute only when the href attribute is set.
Note: This attribute is purely advisory.

HTML 4.01 between HTML5difference

The hreflang attribute is an HTML5 New attribute of <area> tag.

Syntax

<area hreflang="language_code">

Attribute Value

ValueDescription
language_codedouble-character language codes specify the language of the linked document.
To view all available language codes, please visit our Language Code Set Reference Manual.

 HTML <area> tag