I1 · International SEO

HTML Lang Checker — is your page's language declared?

**The `lang` attribute on your `<html>` tag tells everyone — engines, browsers, screen readers — what language your page is written in.** This check confirms it's declared. It's a one-line attribute (`<html lang="en">`) that's easy to forget, but it underpins correct language handling, accessibility, and the foundation of any international setup.

What does the HTML lang check verify?

It checks that the page declares its primary language correctly. Specifically:

- Attribute present — the <html> tag has a lang attribute.

- Valid value — it uses a valid language code (like en, de, or en-GB for region).

- Matches content — the declared language matches the actual language of the page's content.

A valid lang attribute matching the content passes; a present but generic or imprecise declaration is a warning; a missing lang attribute is a fail.

How is it evaluated, and how is it scored?

GEObubbly checks the <html> tag for a valid lang attribute. It's a core, scored International SEO check that runs directly against the page's markup.

Why the lang attribute matters for SEO and GEO

The lang attribute on the <html> element declares the primary language of the page — for example <html lang="en"> or <html lang="en-GB"> for a regional variant. It's small but does real work. For accessibility, screen readers use it to choose the correct pronunciation and voice, so a French page declared as English would be read aloud with the wrong accent and rhythm — confusing or unusable for the listener. For browsers, it informs spell-checking and offers of translation. For engines, it's a clear signal of the page's language, which supports correct handling and helps your content be served to the right audience. It's also the foundation of international SEO: before hreflang can map language and region variants of a page, each page needs to declare its own language clearly. Getting it right is trivial — one attribute with a valid code that matches the content — yet it's commonly missing or left at a template default that doesn't match the actual language. For GEO, a correctly-declared language helps AI engines understand and correctly attribute your content by locale. It's the starting point of International SEO.

How this check scores

  • Pass: lang attribute present and matches the content language.
  • Warning: lang present but generic or slightly mismatched.
  • Fail: No lang attribute, or it contradicts the content.

FAQ

What is the HTML lang attribute?

The lang attribute is a declaration on the <html> tag that specifies the primary language of a page's content, using a standard language code — for example <html lang="en"> for English or <html lang="es"> for Spanish. You can include a region too, like en-GB for British English. It tells browsers, search engines and assistive technologies what language to expect, so they can handle the content correctly. It's a single attribute, but it's the standard way to declare a page's language and a foundational piece of both accessibility and international SEO.

Why does the lang attribute matter for accessibility?

Screen readers use the lang attribute to select the correct pronunciation rules, voice and accent for reading a page aloud. Without it — or with the wrong language declared — a screen reader may read content using the wrong language's pronunciation, making it sound garbled or unintelligible to the listener. For example, French text read with English pronunciation rules is very hard to follow. Declaring the language correctly ensures assistive technology speaks your content properly, which is why the lang attribute is an important accessibility requirement, not just an SEO nicety.

How do I set the lang attribute correctly?

Add the attribute to your opening <html> tag with the appropriate language code: <html lang="en"> for English, or include a region where it matters, like <html lang="en-GB"> or <html lang="pt-BR">. Use the correct ISO language (and optional region) codes, and make sure the declared value actually matches the page's content. If parts of a page are in a different language, you can mark those sections with their own lang attribute. The key is accuracy: the declaration should reflect the real language of the content it covers.

Is the lang attribute a ranking factor?

The lang attribute isn't a major standalone ranking factor, but it supports correct language handling, which matters especially for international and multilingual sites. It gives engines a clear signal of the page's language and works alongside hreflang to help the right language version reach the right audience. Its bigger, more certain value is accessibility and correct browser behaviour. Think of it as foundational hygiene: it won't rocket you up the rankings, but omitting it creates ambiguity and accessibility problems, while including it correctly removes a basic source of confusion for engines and assistive tech alike.

Does declaring the language help AI engines?

Yes. A clearly-declared page language helps AI engines understand what language your content is in and attribute it correctly by locale, which matters as engines serve users across many languages and regions. Correct language declaration reduces ambiguity about who your content is for and helps it be matched to the right audience in AI answers. It's a foundational signal rather than a heavy GEO factor, but combined with proper hreflang and localisation, declaring your language accurately supports your content being understood and surfaced correctly across international AI search.

Audit your page across all 10 checks in International SEO

Run a free audit →