Technical
TechnicalLow

HTML lang Attribute

Checks that <html> has a lang attribute matching the page language.

What this check measures

We read `<html lang="...">` and verify it's set to a valid ISO language code matching the actual content.

Why it matters

Screen readers use lang for pronunciation. Google uses it for language targeting. Wrong lang serves the wrong audience.

search

How our audit detects it

Parse <html> element, check lang attribute value.

Typical findings

  • error_outline<html> without lang.
  • error_outlinelang="en" on a German site (template default).

How to fix

Set lang to your content's ISO code: `en`, `de`, `en-US`, `de-CH`, etc. Update per locale on multilingual sites.

Copy-paste fix prompt for your stack

Lovable · Cursor · Bolt · v0 · Replit · Windsurf · Claude Code · Base44

View the fix prompt →

Frequently asked questions

en vs en-US?expand_more
`en` = any English. `en-US` = US English. Use en-US only if you have separate US/UK versions.

Want this checked on your site?

Pantra runs the full audit (SEO, Security, GEO, Performance, Schema, Technical, Images) in 10 seconds and generates stack-specific fix prompts.

Scan my site

Related checks