In short
Some older XHTML-style templates set both lang and xml:lang on <html>. If they name different base languages (for example lang="en" and xml:lang="fr"), assistive technology gets mixed signals. Make them the same, or remove xml:lang, which modern HTML doesn't need. Weight 3.
<html lang="en">
This guide isn't affiliated with or endorsed by Google.
Related issues
Sources and references
Chrome for Developers, Lighthouse accessibility score
MDN, lang attribute

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 an [xml:lang] Attribute With the Same Base Language as the [lang] Attribute (PageSpeed Insights)](/uploads/pagespeed-html-xml-lang-mismatch-cover.webp)


