In short
The lang on <html> must be a valid BCP 47 language tag: a language code, optionally followed by a hyphen and region. Values like english, en_US (underscore) or uk for English fail. Fix the value in the theme or CMS language setting. Weight 7.
| Wrong | Right |
|---|---|
english |
en |
en_US |
en-US |
en-UK |
en-GB |
This guide isn't affiliated with or endorsed by Google.
Related issues
Sources and references
Chrome for Developers, Lighthouse accessibility score

About the author
Nazmul Nikhil
Head of SEO & Assistant Manager, Digital Marketing at Notionhive
SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.
![<html> Element Does Not Have a Valid Value for Its [lang] Attribute (PageSpeed Insights)](/uploads/pagespeed-html-lang-valid-cover.webp)


