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

HTML Referenzhandbuch

Vollständiges Verzeichnis der HTML-Tags

HTML: <a> hreflang-Attribut

Das <a> hreflang-Attribut spezifiziert die Sprachkategorie eines Dokuments im Link. In diesem Online-Beispiel wird gezeigt, wie das <a> hreflang-Attribut, die Kompatibilität des Browsers, die Syntaxdefinition und detaillierte Informationen zu seinen Attributwerten verwendet werden.

HTML <a> Tag

Online-Beispiel

Die hreflang-Attribut spezifiziert die Sprachkategorie eines Dokuments im Link:

<a hreflang="zh" href="https://de.oldtoolbag.com/">Basic Tutorial Website</a>
Test it out ‹/›

Browser Compatibility

IEFirefoxOperaChromeSafari

All mainstream browsers support the hreflang attribute.

Definition and Usage

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, 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.

HTML 4.01 with HTML5differences

None.

Syntax

<a hreflang="language_code">

Attribute Values

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

HTML <a> Tag