Hreflang and international · Language

Invalid HTML lang attribute

The html element on this page has lang="english", which is not a valid language code, so browsers and screen readers cannot use it.

How this page is built

The opening html tag of this page has lang="english". A valid value is a code such as en or en-GB.

This page has no hreflang annotations, so the only fault is the value of the lang attribute.

Why it matters

The lang attribute tells browsers, screen readers and search engines which language a page is written in. Screen readers use it to choose a voice and pronunciation, and browsers use it to offer translation and pick hyphenation rules.

An invalid value is treated as if there were no value at all. Writing the language name in full, or using an underscore as in en_GB, are common mistakes.

How to check it

View the source and look at the lang attribute on the html element. Check that it is a valid BCP 47 code. Accessibility checkers and crawl tools report invalid values.

How to fix it

Use a valid code, such as en or en-GB. A language code comes first, then an optional region code, joined with a hyphen.

Back to all tests