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

HTML DOM Link hreflang property

Link hreflang property

Link Object Reference Link Object


Definition and Usage

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

Syntax

Set the hreflang property:

linkObject.hreflang="

language-code

"

Return the hreflang property:

linkObject.hreflang


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the hreflang property.


Example

Example

Display the language of the linked document:

Runoob Tutorial(runoob.com)

Try it »


Link Object Reference Link Object