Missing lang attribute
The page's tag has no lang attribute, so browsers, screen readers and translation tools have to guess what language the page is in.

What this issue means
ROC SEO reports a missing lang attribute under check O12. The fix is one attribute: <html lang="en">.
Why it matters
Screen readers use the language to choose the right pronunciation, browsers use it to offer translation, and it is required by the WCAG accessibility guidelines. Google says it does not use the lang attribute to detect language, but it is still part of a well-built page.
How to fix it
- Add the language code to the html tag:
enfor English,urfor Urdu,defor German. - Add a region if it matters:
en-GB,pt-BR. - In WordPress, set the site language under Settings › General; most themes then print it automatically.
- For pages in several languages, mark sections in another language with their own lang attribute, and use hreflang tags between translations.
Find it on your own site
The free ROC SEO extension checks the page you are on for this and more than 60 other issues, each with a fix, and the site crawler checks up to 1,000 pages for free.
Related issues
Frequently asked questions
Does Google use the lang attribute?
Google has said it detects the language from the content, not the lang attribute. It is still important for accessibility and browsers.
Is lang the same as hreflang?
No. lang names the language of the page itself; hreflang links a page to its versions in other languages.
What if my page mixes languages?
Set the main language on the html tag and add lang to elements written in another language.