Home / Core Health / Add the lang attribute to your html tag
On-Page SEO · Scan Check Guide

Add the lang attribute to your html tag

10 min Impact: medium Effort: low ✓ Scan-verified — no manual checkbox

The lang attribute on your <html> tag tells browsers and screen readers what language the page content is in — used for correct pronunciation by assistive technology, browser translation prompts, and as a minor signal to search engines about content language targeting.

The lang attribute tells browsers and screen readers what language your page is in — affecting translation prompts, pronunciation, and accessibility tools.

The full picture

The lang attribute on your HTML tag explicitly declares your page's primary language to both browsers and search engines, supporting several genuine, practical functions including proper screen reader pronunciation, appropriate browser translation prompting, and search engine language-based content categorization.

Without this explicit declaration, browsers and assistive technologies must attempt to infer your content's language through other means, which can produce incorrect results particularly for content that includes technical terms, proper nouns, or other elements that might confuse automatic language detection — explicit declaration removes this ambiguity entirely.

This becomes particularly important for accessibility specifically — screen readers use this declaration to select the appropriate pronunciation rules and voice for reading your content aloud, and an incorrect or missing declaration can result in genuinely confusing or incorrect pronunciation that meaningfully degrades the experience for visitors relying on this assistive technology.

For sites with multiple language versions, this attribute should accurately reflect each specific page's actual language, working in conjunction with the hreflang implementation discussed elsewhere in this broader technical SEO work to provide search engines with complete, accurate signal about your content's language and regional targeting.

How to fix it

  1. 1
    Add the lang attribute
    <html lang="en"> (or the appropriate language/region code) at the top of every page.
  2. 2
    Match it to your actual content language
    If you serve multiple languages on different pages, each should declare its own correct lang value.

Common mistakes

How you'll know it's done

Every page's <html> tag has a correct lang attribute matching its actual content language.

H.I.V.E. checks this automatically

Fix it, then re-scan — the check confirms itself. No manual checkbox, the scan is the truth.

Run this check in H.I.V.E. →