Page must use language code

Definition Page must define the language of its principal content using a valid IANA language code.
Purpose
  • Assistive technologies like screen readers and other speech output technologies need to know the languages represented by the characters in order to speak the text content correctly.
Required Yes for HTML4 Legacy Techniques ruleset mapping
WCAG 2.0 Success Criteria

3.1.1 Language of Page (Level A, Primary Success Criterion)

Rule Category Styling/Content
Scope Page
Target Resources HTML element
Techniques
  • Use the lang attribute on the html or xhtml element to define the principal language of the web page.
  • Use the IANA codes to identify the principal language (e.g. en, fr, ...).
Informational Links