3.2.1. Use the lang attribute to indicate a change in the language

If content is included in a different language to the main language, then the foreign language must be indicated with the lang attribute.

For example, in the case of a page in French:

<ul>
    <li>English version</li>
    <li><a href="http://website.fr" lang="fr">Version française</a></li>
</ul>

Tip

If there is no specific tag that encompasses the content in a foreign language, then use the <span> or <div>tag and specify the lang attribute within it.

Note

Indicating a language change is not necessary for:

  • Proper names.
  • Words of foreign origin, but which are included in dictionaries of the main language.
  • All words of foreign origin, but which are understood and pronounced correctly when spoken with the accent of the main language (“podcast” for example, if the main language is in French).