area hreflang attribute
The hreflang attribute on the area element:
- allows you to add the language of the linked resource; this information is purely advisory
- hreflang is a specific attribute → can be applied ONLY on the next HTML5 elements: a, area, link
Warning: hreflang attribute can be used only if href attribute is present on element.
Examples
<area | attribute | = | "value(s)" | > | Examples | ||
---|---|---|---|---|---|---|---|
5. | hreflang | = | language code | <href="region1.php" alt="region 1" hreflang="fr"> |
Video demonstration area hreflang attribute
HTML5 area hreflang attribute Tutorial
min | video details |
---|---|
00:00 | video tutorial: hreflang attribute on area element |
00:07 | hreflang attribute on area element allows you to specify the language of the resource the href attribute holds |
00:13 | checking the language of the css.php file: it's English |
00:28 | adding the hreflang attribute to area element |
00:33 | adding the corresponding language code: en for English |
00:39 | no change in display,this information is purely advisory |