Easy Tutorial
❮ Av Event Canplaythrough Ev Onload ❯

HTML <link> hreflang Attribute

HTML <link> Tag

Example

Here, the hreflang attribute is used to indicate that the linked document is written in English:


Browser Support

Almost no major browsers support the hreflang attribute. However, it can be used by search engines or in scripts.


Definition and Usage

The hreflang attribute specifies the language of the text in the linked document.

The hreflang attribute can only be used if the href attribute is set.

Note: This attribute is purely advisory.


Differences Between HTML 4.01 and HTML5

None.


Syntax

Attribute Values

Value Description
language_code A two-letter language code that specifies the language of the linked document. For a list of all available language codes, visit our Language Code Reference.

❮ Av Event Canplaythrough Ev Onload ❯