language
GUIDELINES 3.1.
Overview
Declaring the language of your page and any sections written in a different language allows screen readers to use the correct pronunciation engine, speech rules, and character rendering for that language.
Who is impacted
How to test
Resources
The lang Attribute
Every HTML page should declare its primary language using the lang attribute on the element. For example, an English page should open with . Without this, screen readers may default to the user's system language setting and mispronounce content, making the page difficult or impossible to understand.
Language codes follow the BCP 47 standard. Common examples include en for English, fr for French, es for Spanish, and ja for Japanese. You can also specify regional variants such as en-CA for Canadian English or fr-CA for Canadian French.
Multilingual Content
If a page contains passages written in a different language than the declared page language, wrap those passages in an element with its own lang attribute. For example, a French quote on an English page should be marked up as
. This ensures screen readers switch pronunciation rules for that passage and then return to the page's primary language automatically.