dotvitals

The page does not declare what language it is written in

LowConfirmedQuick winseo.html-lang.missing

What this check looks for

The <html> element carries no lang attribute, so nothing in the markup says what language the page is written in. Screen readers, translation prompts and hyphenation all depend on that declaration.

Why it matters

A screen reader with no language to work from pronounces the page in the reader's default voice — English read aloud by a French synthesiser is close to unintelligible. It is one attribute, on one element, and it is a WCAG Level A requirement.

When the check passes, your report says: “The page declares its language in <html lang>”.

What it costs your score

When this check fails it removes 5 points from your SEO score, before the status, confidence and repeat multipliers are applied. SEO carries a weight of 5 in the overall score.

It shares the seo.i18n family ceiling of 8 points: however many findings that family produces, together they cannot remove more than that from SEO. One underlying problem showing up in several places is still one problem.

Severity
low
Default confidence
confirmed
Status when triggered
warn
Deduction
5 points
Family cap
seo.i18n · 8
Category
SEO
Module
Seo audit
Fix owned by
user
In the ruleset since
2026.09

How the whole score is calculated

How to fix it

Add a lang attribute to the <html> element naming the page's language.

It is what assistive technology reads to choose a voice, and a WCAG 2.2 Level A requirement.

  1. Set it on the root element in your layout or base template, so every page inherits it: <html lang="en">.

  2. Use the language your content is actually in. Add a region only when it matters — en is right for most English pages; en-GB and en-US differ for a synthesiser's accent and for spell-checking.

  3. Mark individual passages in another language with lang on the element that wraps them, rather than changing the page's declaration.

  4. On a multilingual site, generate the attribute from the same locale the page is rendered in, so it cannot drift from the content.

How to confirm it worked

  • curl -sS ‹url› | grep -io '<html[^>]*' — the tag should carry a lang attribute

A named slot like ‹domain› — and the braces left in the configuration below — is filled in with your own values when this rule appears on a report.

Remediation by platform

Page HTML
<html lang="en">
  …
  <p>Ce paragraphe est <span lang="fr">en français</span>.</p>
  • The root element declares the page's language; an element-level lang marks a passage that differs from it.

Technical detail

‹url› serves markup whose root element has no lang attribute.

WCAG 2.2 Success Criterion 3.1.1 (Language of Page, **Level A**) requires the default human language of a page to be programmatically determinable. The HTML standard's answer to that is the lang attribute on the root element, and it is what assistive technology, the browser's own translation offer, hyphenation, and quote and date formatting all read.

**This is not presented as a ranking signal.** Google's documentation on localized versions describes language targeting through the page's visible content and hreflang annotations and does not name lang among the signals it uses, which is why this rule sits with the internationalisation checks rather than with indexability. The reason to set it is the reader, not the crawler.

Set the language of the *page*, and mark up passages in other languages individually with lang on the element that contains them (WCAG 3.1.2, Level AA). An attribute on <body> rather than <html> is not equivalent — the standard's declaration lives on the root.

Standards and references

Test this on your domain

Run the check that produces this finding, on its own, against any domain.

Open the seo audit checker

Other seo audit checks