Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML hreflang property

HTML hreflang property

HTML a Tag Reference HTML tag

Example

The hreflang property specifies the language of the linked document:

Runoob Tutorial

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the hreflang property.


Definition and Usage

The tag's hreflang property is used to specify the language of the linked document.

This property only works if the href property is set.

Note: Unlike the lang property, the hreflang property does not specify the language of the content within the tag, but rather the language of the document referenced by the href property.


Differences between HTML 4.01 and HTML5

NONE.


Syntax

Attribute Values

Value Description
language_code A two-letter language code specifying the language of the linked document.
To view all available language codes, please visit our Language Codes Reference.

HTML a Tag Reference HTML tag