NoticeMeta Tags
Missing HTML Lang Attribute: How to Fix It
The lang attribute on the <html> tag declares the language of the page, for example lang="en" or lang="ur".
Quick fix: Add a lang attribute to the <html> tag, for example <html lang="en">, so search engines and screen readers know the page language.
Why it matters for SEO
It helps search engines serve the page to the right audience, lets browsers offer translation, and tells screen readers how to pronounce the text.
How to fix it
- 1Open the main layout or template file.
- 2Add lang="xx" to the <html> tag using the ISO language code.
- 3Add a region if needed, for example en-US or en-GB.
Example
<html lang="en">Frequently asked questions
Is lang the same as hreflang?
No. lang describes the current page, while hreflang links to translated versions of it.
Does lang affect rankings?
Indirectly. It improves accessibility and helps Google understand the page language.
Does your website have this issue?
Run a free SEO audit to check this and 40+ other issues in seconds.