Back to Learn
Pulseaccessibility
HTML lang Attribute Is Valid
What This Audit Checks
This audit verifies that the lang attribute on the <html> element contains a valid BCP 47 language tag. An invalid tag (such as a misspelling or made-up code) is treated the same as having no lang attribute at all.
Why It Matters
Screen readers depend on a valid language tag to select the correct speech synthesizer and pronunciation rules. An invalid tag causes fallback behavior that may mispronounce content or switch to a wrong language entirely.
How to Fix It
- Use a recognized BCP 47 primary language subtag. Common values:
en,nl,de,fr,es,ja,zh. - Check for typos.
lang="en"is valid.lang="english"orlang="eng"is not. - Include region subtags only when needed.
lang="en-US"andlang="en-GB"are both valid, butlang="en"is sufficient in most cases.
<!-- Bad: invalid language tag -->
<html lang="english">
<!-- Bad: empty value -->
<html lang="">
<!-- Good: valid BCP 47 tag -->
<html lang="en">
<!-- Good: valid with region -->
<html lang="nl-NL">
How Pulse Tracks This
Pulse flags this audit in your Lighthouse accessibility score. When the audit fails, Pulse shows which elements triggered it so you can fix them directly.