- Class
- C3 Standard
- Weight
- 2
- Severity on fail
- minor
- Applies to
- the HTML Standard
Scope and evidence
Evaluated on page (P). The book marks this requirement STANDARD.
Fail conditions
Each condition has a stable code and a reason template. The evaluator fills the placeholders from observed values only; no sentence in a report is generated.
missingThe <html> element of {url} has no lang attribute. The HTML Standard encourages a lang attribute on the root element. Google does not use it to detect a page's language, so this is a standards and accessibility finding.
malformedThe lang value “{value}” on {url} is not a well-formed language tag.
The documented fix
Set lang from the page's locale (en, en-US, de).
Sources, quoted
These are the passages the rule rests on, stored once in the knowledge base and emitted exactly as written. A citation marked for specific conditions appears only on findings with those codes.
“Authors are encouraged to specify a lang attribute on the root html element, giving the document's language.”
[WHATWG-SEM] HTML Standard: 4.2 Document metadata (and 4.1 The document element) · The html element · last updated Living Standard
https://html.spec.whatwg.org/multipage/semantics.html“Google doesn't use hreflang or the HTML lang attribute to detect the language of a page; instead, we use algorithms to determine the language.”
[G-HREFLANG] Tell Google about localized versions of your page · Methods for indicating your alternate pages · last updated 2026-09-21
https://developers.google.com/search/docs/specialty/international/localized-versions