Atributo HTML <link> hreflang

❮ Tag HTML <link>

Exemplo

Aqui, o atributo hreflang indica que o documento vinculado está em inglês:

<link href="tag_link.asp" rel="parent" rev="subsection" hreflang="en">

Definição e uso

O hreflangatributo especifica o idioma do texto no documento vinculado.

Este atributo é usado apenas se o hrefatributo estiver definido.

Nota: Este atributo é puramente consultivo.


Suporte ao navegador

Attribute
hreflang Yes Yes Yes Yes Yes

Nota: O hreflangatributo não é renderizado como algo especial em nenhum dos principais navegadores. No entanto, ele pode ser usado por mecanismos de pesquisa ou em scripts.


Sintaxe

<link hreflang="langauge_code">

Valores de atributo

Value Description
language_code A two-letter language code that specifies the language of the linked document.

To view all available language codes, go to our Language code reference.


❮ Tag HTML <link>