Skip to content
Devtoolry

Language and hreflang

Missing lang attribute

OpportunityLow priority

The <html> element has no lang attribute. Screen readers may read the page in the wrong voice, and browsers may offer to translate it needlessly.

What it means and why it matters

The lang attribute declares the page's language. Screen readers use it to pick pronunciation, and browsers use it for translation prompts and hyphenation.

Google says it detects the language from the content itself, so this matters more for accessibility than for ranking.

How to fix it

  1. Add the language to the <html> element in your main template.
  2. On multilingual sites, set it per page to the language of that page, matching its hreflang code.
Before
<html>
After
<html lang="en-GB">

Find it on your site

These free tools check for missing lang attribute and run without a sign-up:

Browse every problem in the SEO Issues Library.