English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
<a> hreflang attribute is used to specify the language category of the document in the link, this online example demonstrates how to use the <a> hreflang attribute, browser compatibility, syntax definition, and detailed information about its attribute values.
The hreflang attribute specifies the language category of the document in the link:
<a hreflang="zh" href="https://www.oldtoolbag.com/">Basic Tutorial Website</a>Test and see ‹/›
IEFirefoxOperaChromeSafari
All mainstream browsers support the hreflang attribute.
The hreflang attribute specifies the language of the linked document.
This attribute should only be used when the href attribute is set.
Note: This attribute is purely advisory.
Note: Unlike the lang attribute of HTML, the hreflang attribute does not specify the language used in the content of the tag, but specifies the language used in the document called by the href attribute.
none.
<a hreflang="language_code">
Value | Description |
---|---|
language_code | double-character language codes specify the language of the linked document. To view all available language codes, please visit our Language Code Reference Manual. |