HTML Lang Checker

Score whether the document declares a real BCP 47 language — not hreflang, not a ranking trick.

What this tool gives you

html lang score
Fetch or paste
BCP 47 hygiene
Starter snippet

Check html lang

Fetch a public page or paste the root tag. This scores document language — not hreflang, not a ranking trick.

What this checker looks for

html lang tells browsers and screen readers the page language. It does not replace hreflang.

lang on <html>

One BCP 47 tag on the root element, not only xml:lang.

Hyphens, not underscores

en-US is valid. en_US is not.

Canonical casing

Language lowercase, region uppercase.

xml:lang optional

Fine to omit on HTML5. If present, it must match lang.

Not Content-Language

http-equiv is a fallback, not a substitute.

Not a ranking lever

This is a11y and crawl hygiene, not a citation trick.

How to use the checker

Fix the root lang first. hreflang is a separate map of language variants.

1

Check the live page

Fetch the public URL or paste the <html> tag from view-source.

2

Keep a BCP 47 tag

lang="en" or lang="es-GT". Hyphens, not underscores.

3

Leave xml:lang alone

Omit it on HTML5, or make it match lang exactly.

What a healthy html lang usually includes

One root. One language. Hyphens. No x-default on the document itself.

PartJobDefault for public sites
html langDeclare this document's languagelang="en" or lang="es"
BCP 47Machine-readable language taghyphens, not en_US
RegionOptional localeen-US / es-GT only if true
xml:langXHTML leftoveromit, or match lang
Content-LanguageHTTP/meta fallbackomit if lang is set
x-defaulthreflang onlynever on <html>

Related GEO pages

Fix document language, then lock hreflang, then title/meta.

HTML lang FAQs

Does html lang make ChatGPT cite my page?

No. lang tells browsers and screen readers the page language. Citations still depend on crawl access, answer-ready content and corroboration.

Is html lang the same as hreflang?

No. lang describes this document. hreflang points at language/region variants. A Spanish page still needs lang="es" even with no alternate links.

Should I use en or en-US?

Use the most specific tag that is true. en is enough for generic English. Use en-US or es-GT only when the content is region-specific.