HTML / XML / JS, low-level validity (cross-cutting)MediumInferred

Mixed/invalid lang codes

Inconsistent or invalid language codes across the html lang attribute, hreflang and content confuse language handling. Codes should be valid and consistent everywhere.

What it is

Wrong language codes.

Why it matters

Confuses language handling/a11y.

How to fix it

Use valid codes consistently.

How to find it on your site

  1. Review the lang attribute, hreflang and any locale codes.
  2. Validate them against ISO standards.
  3. Make them consistent and correct across the page and site.
  4. Re-validate.

Cross-reference to ranking and citation factors

Invalid or mismatched lang codes undermine language targeting and accessibility. Consistent, valid codes keep it reliable.

Impact

Low-medium. Inferred.

Evidence

Valid language declaration. Google Search Central, Tell Google about localized versions (hreflang); W3C, Web Content Accessibility Guidelines (WCAG) 2.2