Attributo HTML <a> hreflang
Esempio
L'attributo hreflang specifica la lingua del documento nel collegamento:
<a href="https://www.w3schools.com" hreflang="en">W3Schools</a>
Definizione e utilizzo
L' hreflang
attributo specifica la lingua del documento collegato.
Questo attributo viene utilizzato solo se l' href
attributo è impostato.
Nota: questo attributo è puramente consultivo.
Supporto browser
Attribute | |||||
---|---|---|---|---|---|
hreflang | Yes | Yes | Yes | Yes | Yes |
Sintassi
<a hreflang="language_code">
Valori di attributo
Value | Description |
---|---|
language_code | A two-letter language code that specifies the language of the linked document. To view all available language codes, go to our Language code reference. |
❮ Tag HTML <a>