Skip to content

Why the html lang attribute matters

SEO1 min readFixes check lang-attr

The lang attribute tells browsers, search engines and screen readers what language the page is in. It affects translation prompts, hyphenation and pronunciation.

Step by step, with screenshots: Hreflang return links — why Google ignores your language tags →

Check your own site

Runs this check and the other 186, free, in about 45 seconds.

What a passing site looks like

  • The <html> element declares its languagewarning · −1.5 ptseffort S

The <html> element has no valid lang attribute

Why it matters. The lang attribute tells search engines and translation tools which language the page is in, and lets screen readers pick the right pronunciation.

How to fix it.
  1. Add lang to the html element, for example <html lang="hr"> or <html lang="en-GB">.
  2. In WordPress the theme prints it from Settings → General → Site Language.

Filed under Technical SEO. Copy is generated from the same catalogue that scores every report, so what you read here is what the report says.