English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
O atributo hreflang especifica o idioma do texto do documento linkado, e é usado apenas quando o atributo href está configurado.
Aqui, o atributo hreflang indica que o documento linkado é em inglês:
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Uso do atributo hreflang do link HTML-Aula Básica(oldtoolbag.com)</title> <link href="tag_link.php" rel="parent" rev="subsection" hreflang="en"> </head> <body> <p>oldtoolbag.com example page.</p> <p>The hreflang attribute will not display any special content in any mainstream browser. However, it can be used by search engines or scripts./p> </body> </html>Test to see ‹/›
IEFirefoxOperaChromeSafari
Almost no mainstream browsers support the hreflang attribute. However, it can be used through search engines or scripts.
The hreflang attribute specifies the language of the text in the linked document.
The hreflang attribute can only be used when the href attribute is set.
Note:This attribute is purely advisory.
None.
<link hreflang="langauge_code">
Value | Description |
---|---|
language_code | Language codes with double letters specify the language of the linked document. To view all available language codes, please visit our Language Code Reference Manual. |