HTML <link> hreflang eigenschap
Definition and usage
hreflang
Attribute specifies the language of the text in the linked document.
Only when href attribute Use this attribute only
Note:This attribute is purely advisory.
Example
In this case, the hreflang attribute indicates that the linked document is in Chinese:
<link href="tag_link.asp" rel="parent" rev="subsection" hreflang="zh">
Syntax
<link hreflang="langauge_code">
Attribute value
Value | Description |
---|---|
language_code |
Language codes consisting of two letters specify the language used in the linked document. To view all available language codes, please visit ourLanguage code reference manual. |
Browser support
Chrome | Edge | Firefox | Safari | Opera |
---|---|---|---|---|
Chrome | Edge | Firefox | Safari | Opera |
Support | Support | Support | Support | Support |
Note:hreflang
Attributes will not be displayed as any special style in any mainstream browser. However, it can be used by search engines or scripts.