Skip to main content
Raasta
SeriousWCAG 3.1.1 · Level Ahtml-lang-valid

Page language code is not valid

A lang attribute on <html> with a value that isn’t a real language code, such as lang="english" or lang="en_GB", stops screen readers picking the right voice and pronunciation. Use a valid code such as en, en-GB, fr or de.

Who it hurts

Screen reader users, especially people who read in more than one language, and anyone using browser translation.

Underscores (en_GB) come from server locale settings; full names (“English”) come from language pickers.

How to fix it

Pick your stack. Review every change before you ship it.

Before

<html lang="english">

After

<html lang="en">

Check it by hand too

View the page source and check the <html lang> value is a code like en-GB. Then listen to a paragraph with a screen reader to check the accent.

Automated checks find a large share of accessibility problems, but not all of them. Passing this check does not on its own make a page compliant.

WCAG reference