3.1.1 – Language of Page (Level A)

Every page of your website has a language assigned

Setting every webpage’s HTML language is an easy way to help your users, including those browsing your website with assistive technology. Setting a language is important because the way that screen readers pronounce words depends on the HTML language assigned to your website.

What to do

Ensure that each page of your website has a language assigned to it.

Tips

  • Set the language in your template and you’ll only need to do this once.
  • If you trade internationally and have different parts of your website in different languages, make sure they are assigned correctly.
  • HTML language codes match the ISO language codes standard. W3Schools has a full list of language codes.

See also

 

  • To get an idea of the importance of doing this, it can be fun to try and understand what a screenreader is saying when the language code is wrong. Try a page in English with lang=”de” (German) or “fr” for example, and listen to it with free screenreader NVDA, or JAWS (which isn’t free but can be run in demo mode for 40 minutes).

  • Sunny

    What about bilingual pages? Do you set the language for both languages?

    • Hi Sunny – the page should be set to the main language on the page (this will be up to you if it’s 50/50) – you then need to mark text in the second language separately – see http://www.wuhcag.com/language-of-parts for more about that.