<html> element has a valid value for its [lang] attribute

The page has a valid language code so screen readers pronounce content correctly.

On this page

Impact

ScanGov impact ratings

About

Specifying a valid [BCP 47 language](https://www.w3.org/International/questions/qa-choosing-language-tags#question) helps screen readers announce text properly. [Learn how to use the lang attribute](https://dequeuniversity.com/rules/axe/4.10/html-lang-valid).

Why it's important

Helps screen readers pronounce content correctly by identifying the language of the page and its elements.

User stories

As a screen reader user, I want the page language to be correctly identified so that content is pronounced properly.

Code

Failing pattern:

<!-- Fail: invalid BCP 47 value -->
<html lang="english">

Passing pattern:

<!-- Pass: valid BCP 47 language code -->
<html lang="en">

Error

ScanGov messaging when a site fails a standard:

Failed: <html> element has a valid value for its [lang] attribute

Guidance

Indicators

On this page