This is a DRAFT resource that supports Working Drafts of WCAG 3. Content in this resource is not mature and should not be considered authoritative. It may be changed, replaced or removed at any time.


🔙 WCAG 3.0 (Silver) Guidelines

Method: HTML lang attribute indicates the language of text


This method supports the outcome Changes Of Natural Language.


  • All platforms that support HTML.


  • HTML

Input aspects for testing

  • CSS styling
  • DOM tree


When authors specify the correct natural language of content, user agents, including assistive technologies, can present text more accurately. Screen readers can load the correct pronunciation rules and braille tables for languages.

How it solves user need

Specifying both the natural language of the view's main content as well as any changes in language of blocks of content in that view can help:

  • People who use screen readers or other technologies that convert text into synthetic speech;
  • People who use braille that need the correct tables to be applied to text; and
  • People with certain cognitive, language, and learning disabilities who use text-to-speech software.

When to use and what to do

Ensure that the HTML element has a lang attribute. The lang attribute value must use a valid language tag, for example lang="en" indicates the language as English. The attribute value must match the natural language of the page title element. Changes in language must be indicated using the lang attribute on the closest parent element.

Back to Top