Set language

For: Development, Content

Language of page (3.1.1 level A

https://www.w3.org/WAI/WCAG21/Understanding/language-of-page

  • Provide a lang attribute on the page's html element.
  • For example, if you view page source you should see this at the start of the page. <html lang="en">
  • If the page was in a different language, then a different lang attribute should be used.

Language of parts (3.1.2 level AA)

https://www.w3.org/WAI/WCAG21/Understanding/language-of-parts

  • If a portion of the page is in a different language, use the lang attribute on that part. For example <p>The title is <span lang="fr">Le Bon Usage</span>.</p>