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:

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


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.


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).

notices/html-css/utiliser-l-attribut-lang-pour-signaler-les-changements-de-langue-dans-le-corps-de-la-page.txt · Last modified: 11 June 2013 at 14:19 by Sébastien Delorme (Atalan)

Project coordinated by Atalan.

In partnership with: