Missing Language

No Comments
Missing language

Element Code: IN-052

TL;DR: Your page's HTML tag is missing a lang attribute, so browsers, screen readers, and search engines have no reliable signal for what language the content is in. It will not tank your rankings by itself, but it breaks accessibility tooling, triggers unwanted auto-translate prompts, and undermines hreflang if you run a multilingual site. Fix takes minutes.
Issue Type
Missing HTML attribute
Severity
Low to medium
Affects
Accessibility, UX
Fix Effort
5 to 30 minutes
Where
<html> tag

What the Missing Language Check Actually Flags

This check looks at one specific thing: whether your page's opening <html> tag declares a lang attribute, and whether that attribute has a value at all. So <html> or <html lang=""> both fail. <html lang="en"> or <html lang="fr-CA"> pass. That is the entire scope of this check. It does not evaluate whether the value you picked is the correct language, it just confirms one is present and non-empty.

People conflate this with hreflang constantly, so let me draw the line clearly. The lang attribute is a declaration: it tells any consumer of the page, browser, screen reader, translation tool, crawler, "this document's content is written in language X." Hreflang is a targeting signal: it tells Google "here is the URL for this same content in language Y, aimed at users in region Z." One describes what a page is. The other maps relationships between multiple pages. You can have perfect hreflang and still be missing lang on every page. You can have lang set correctly everywhere and have zero hreflang tags because you only run one language. They are related concepts that solve different problems, and a site running international SEO needs both done right, not one instead of the other.

Why It Matters

Start with accessibility, because that is where the impact is most direct and most documented. Screen readers use the lang attribute to select the correct pronunciation engine and phoneme set. If a French-language page has no lang attribute, most screen readers default to whatever language the user's assistive technology is set to, typically English for US-based screen reader users. The result is a screen reader trying to pronounce French words using English phonetic rules, which is close to unintelligible. This is not a minor edge case: it is codified as WCAG Success Criterion 3.1.1 (Language of Page), a Level A criterion, meaning it is one of the baseline requirements for a conformant, accessible site. If your organization has any accessibility compliance obligation (ADA, Section 508, EN 301 549, AODA), a missing lang attribute is an automatic fail on an automated accessibility audit.

Second, browser behavior. Chrome, Edge, and other Chromium browsers use the lang attribute to decide whether to offer an auto-translate prompt. Without it, the browser falls back to language detection heuristics run against the visible text, which are inconsistent. You'll see false "Translate this page?" prompts on English pages, or no prompt at all on pages that actually need one. That is a real UX papercut for real visitors, and it happens more often than people expect on sites that have never bothered to set lang.

Third, it feeds into internationalization correctness. If you run hreflang across multiple language versions of a page, a missing or wrong lang attribute on the target pages does not break hreflang validation directly (Google reads the hreflang annotations themselves, not the lang attribute, to resolve alternates) but it is a strong tell that your i18n setup was done sloppily, and sloppy i18n setups are where hreflang mistakes cluster: wrong region codes, missing return tags, inconsistent canonicalization. Treat a missing lang attribute as a canary. If it's missing, go check your hreflang implementation too, because if one got skipped the other might have as well.

Now the honest part: this is not a meaningful ranking factor on its own. Google has never listed the lang attribute as a signal it uses for ranking, and there's no credible evidence it materially affects visibility for a single-language site. If your English-language blog has no lang attribute and ranks fine, adding lang="en" tomorrow is not going to move your position. This is a hygiene and accessibility fix, not a ranking hack. I'd still fix it on every site I audit, because it's free, it's fast, and it removes a real user-facing and compliance-facing problem, but don't sell it internally as an SEO win. Sell it as what it is.

How Browsers and Screen Readers Handle It

The diagram below shows the practical difference between a page with and without the attribute set.

Without lang attribute <html> Screen reader: defaults to system language, mispronounces non-English text Browser translate prompt: unreliable, based on guessed text detection Accessibility audit: fails WCAG 3.1.1 (Level A) With lang attribute <html lang="fr"> Screen reader: loads correct pronunciation rules and braille tables Browser translate prompt: triggers correctly based on declared language vs user locale Accessibility audit: passes WCAG 3.1.1 (Level A)

How to Detect It

This is a trivial detection problem, which is part of why it's inexcusable to leave sites shipping without it.

  • View source: the fastest manual check. Right-click, View Page Source, look at the opening <html> tag. If there's no lang attribute or it's empty, that's the issue, no tool required.
  • Screaming Frog: the SEO Spider's built-in Accessibility report (powered by axe-core) flags this natively under "HTML Element Requires Lang Attribute" and "HTML Element Lang Attribute Value Must Be Valid," both tied to WCAG 2.0 Level A. You don't need a custom extraction for the basic check, though a custom extraction with XPath //html/@lang is useful if you want the raw value exported for every URL in a crawl to spot-check inconsistent codes across a large site.
  • Sitebulb: flags missing or invalid lang attributes as part of its Accessibility audit category, with the same severity framing tied back to WCAG.
  • Google Search Console: does not have a direct "missing lang attribute" report. It's not a Core Web Vitals or Page Experience factor, so you won't find it flagged there. If you're relying only on Search Console for technical health, you'll miss this entirely, which is a decent argument for running Screaming Frog or Sitebulb crawls periodically regardless of what GSC shows.
  • Automated accessibility scanners (axe DevTools browser extension, WAVE, Lighthouse's Accessibility audit): all of these will surface a missing lang attribute as a failed check, usually described in terms of WCAG 3.1.1.

How to Fix It

The fix itself is a one-line change. The work is making sure it's applied consistently and set to the right value.

  1. Identify the correct language code. Use a standard two-letter ISO 639-1 code (en, fr, de, es, ja) and optionally a region subtag if it matters for your content (en-US vs en-GB, pt-BR vs pt-PT). Don't overthink region subtags unless you're actually running region-specific content or hreflang variants that depend on the distinction.
  2. Static HTML sites: open your template or every HTML file and set it directly: <html lang="en">. If you're hand-maintaining multiple static pages without a build system, this is exactly the kind of thing that drifts, so it's worth a quick grep across your source directory for <html to confirm every file has the attribute set consistently.
  3. WordPress: most modern themes already output this correctly via the language_attributes() function inside the theme's header.php, which pulls from the site language set in Settings, General. If it's missing, check whether your theme's header.php calls <html >. If you can't or don't want to touch the theme file, a small snippet in functions.php hooked to a filter, or a lightweight accessibility plugin, can inject or correct the attribute. If you run a multilingual WordPress setup with WPML or Polylang, those plugins handle per-page lang attributes automatically based on the content's assigned language, so a missing attribute on a multilingual build usually points to a plugin misconfiguration rather than something you need to hand-code.
  4. Multilingual and hreflang setups: each language version of a page needs its own correct lang value matching that page's actual content language, not just the default site language repeated everywhere. This is the detail teams get wrong: they set lang="en" once in a base template and never override it on the French or German URL variants, so every page across every locale claims to be English regardless of hreflang tags pointing between them. Audit this by crawling each locale subfolder or subdomain separately and confirming the lang value changes accordingly.
  5. JavaScript-rendered or SPA sites: if your framework renders the shell client-side, make sure the lang attribute is set on the initial server-rendered HTML, not injected only after hydration. Crawlers and screen readers that don't wait for full JS execution will see the unset version otherwise.
  6. Verify after deploying. Re-crawl with Screaming Frog or view-source a sample of URLs across templates (homepage, category, product or article page, any custom landing page templates) since different templates on the same site sometimes pull from different header files.

What good looks like: every page on the site, checked across every template type, declares a non-empty, valid lang attribute matching its actual content language. On multilingual sites, that value varies correctly per locale and stays in sync with whatever hreflang annotations point to that URL.

Do This, Not That

DO

  • Set lang on the html tag in your base template so every page inherits it
  • Match the lang value to the page's actual written content, not the target audience's assumed language
  • Set a distinct, correct lang value per locale on multilingual builds
  • Re-check after theme updates or migrations, since header files get overwritten
  • Pair this fix with an actual hreflang audit if you run multiple languages
DON'T

  • Assume this fix will move rankings, it won't by itself
  • Hardcode lang="en" globally on a multilingual site and call it done
  • Confuse this check with hreflang validation, they test different things
  • Rely only on Search Console to catch this, it doesn't report it
  • Leave the attribute empty (lang="") thinking that counts as declared, it doesn't

Lang vs Hreflang: Quick Comparison

Aspectlang attributehreflang
LocationOn the <html> tag of each pageIn <head> link tags or sitemap, or HTTP headers
PurposeDeclares what language this page's content is inMaps this page to equivalent pages in other languages/regions
Primary audienceBrowsers, screen readers, assistive techSearch engine crawlers
Ranking impactNone documented directlyNot a ranking factor either, but affects which URL is served
Accessibility impactDirect, required for WCAG 3.1.1None
Needed on single-language sitesYes, alwaysNo, only relevant with multiple language/region versions

FAQ

Will fixing this improve my Google rankings?
Not directly. There's no evidence Google uses the html lang attribute as a ranking signal. Fix it for accessibility compliance and browser behavior, not as an SEO tactic. If you're chasing quick ranking wins, look elsewhere.
Is this the same thing as hreflang?
No. Lang declares the language of the current page's content. Hreflang links that page to equivalent versions in other languages or regions for search engines. You can need one without needing the other, though multilingual sites should get both right.
What value should I use if my page has mixed languages?
Set the lang attribute on the html tag to whatever language makes up the majority of the content. For specific sections written in a different language, such as a quoted passage or a code sample, wrap that section in an element with its own lang attribute, for example a span or div with lang="fr" around a French quote inside an English page.
Does Google Search Console report this issue?
No, Search Console does not have a dedicated report for missing lang attributes. It's not tracked as part of Core Web Vitals or Page Experience. You need a crawler with an accessibility module, such as Screaming Frog or Sitebulb, or a browser accessibility scanner like axe DevTools or Lighthouse, to catch it.
My site is only in English. Do I still need to bother?
Yes. Single-language sites need lang="en" (or whatever your language is) just as much as multilingual ones. It's not an international-SEO-only fix, it's a baseline accessibility requirement under WCAG 3.1.1 regardless of how many languages you publish in.
Want a full technical audit, not just this one check?

A missing lang attribute is usually a symptom of a template that hasn't been reviewed in a while. If you want someone to go through your whole site's technical foundation, indexation, crawlability, hreflang, structured data, and accessibility together, that's exactly what we do.

Get an Advanced SEO Audit

Claude Vincent is a technical SEO consultant focused on crawlability, rendering, and AI-search visibility. He writes the field guides and case studies at SEO ProCheck, with a bias toward the durable, unglamorous work that decides whether search engines and AI answer engines can actually read and cite a site.

About SEO ProCheck

Technical SEO consulting and GEO strategy with 20 years of enterprise experience. Case studies, resources, and tools for search and AI visibility.

Work With Me

Technical SEO audits, GEO strategy, site migrations, and international SEO. Hourly consulting for teams who need hands-on support, not just reports.

Subscribe to our newsletter!

More from our blog