![]() |
VOOZH | about |
HTML hreflang Attribute is used to specify the language for a linked document. It is used only when the href attribute is set.
Syntax:
<element hreflang="language_code"> Attribute Value:
The hreflang attribute contains a single value language_code which is the two-letter language code and used to specify the language of the linked document e.i. en for English, hi for Hindi, etc.
Example 1: the This Example illustrates the use of hreflang attribute in anchor element.
Output:
👁 HTML hreflang Attribute ExampleExample 2: This Example illustrates the use of hreflang attribute in area element.
Output:
The browser supported by hreflang Attribute are listed below: