1.8 URL structure & internationalisationMediumInferred

html lang mismatch vs content

What it is

The lang attribute on the html element should match the actual language of the page. A mismatch, French content declared as English, confuses assistive technology and language handling. Declared language differs from actual. Confuses language handling and accessibility. Set lang to match the content.

Why does html lang mismatch vs content matter for AI search?

Confuses language handling and accessibility.

How do you fix it?

Set lang to match the content.

How do you find it on your site?

  1. Read the lang attribute on the html element.
  2. Compare it to the real language of the page content.
  3. Correct the attribute to match the content.
  4. Check templates are not hard-coding the wrong language.

Which ranking and citation factors does it touch?

A correct lang attribute aids accessibility and language processing. A mismatch is a quality and accessibility issue more than a ranking one.

What is the impact?

Low-medium. Inferred (a11y + i18n).

What is the evidence?

Declare the correct content language. Google Search Central, Tell Google about localized versions (hreflang); W3C, Web Content Accessibility Guidelines (WCAG) 2.2

Frequently asked questions about html lang mismatch vs content

What does "html lang mismatch vs content" mean?

Declared language differs from actual.

How do you fix html lang mismatch vs content?

Set lang to match the content.