Missing HTML Language Attribute
What This Means
The document's root <html> element does not have a lang attribute. The page has not declared the natural language of its content.
Why It Matters for SEO
The lang attribute serves multiple purposes: it tells screen readers which language to use for pronunciation; it enables browsers to offer translation services; it helps search engines understand the content's language for appropriate regional targeting; and it is a WCAG 2.1 accessibility requirement (Success Criterion 3.1.1).
From an SEO perspective, the lang attribute is a supporting signal for language targeting. While search engines infer language from content analysis, an explicit declaration removes ambiguity — particularly for short pages or pages in languages that are easily confused.
What the Platform Checks
The platform checks the <html> element for a lang attribute with a non-empty value. Fires when the attribute is absent or empty.
How to Fix It
Add a lang attribute to the root <html> element:
<html lang="en">
- Use a valid BCP 47 language tag:
lang="en"for English,lang="en-US"for US English,lang="fr"for French,lang="de"for German, etc. - For multilingual pages where a primary language is identifiable: use the primary language's code.
- In CMS templates: add the lang attribute to the html element in the base layout template — one change covers all pages.
This is both an accessibility fix and an SEO hygiene improvement.
Find every pagemissing the lang attribute
The audit flags every page without a lang attribute — a template-level fix resolves all affected pages at once.