How to Fix Missing Language Attribute
What it is
The lang attribute on the html element states the main language of the page, for example lang="en" for English.
Why it matters
- Screen readers use it to choose the right pronunciation.
- Browsers can use it for translation prompts and hyphenation.
- Search engines can use it as one hint about audience language.
How to fix it
- Pick the correct language code (en, es, fr, de and so on).
- Add it to the html tag.
- If your site is multilingual, set it per page.
- Re-scan to confirm.
Platform tips
| WordPress | Settings > General > Site Language sets it automatically via language_attributes(). |
|---|---|
| Wix | Wix sets it from your site language: Settings > Language & Region. |
| Squarespace | Settings > Language & Region sets the site language; check your template if it is still missing. |
| Shopify | Online Store > Preferences and Languages; the theme.liquid html tag should include lang="{{ request.locale.iso_code }}". |
| Plain HTML | Change <html> to <html lang="en">. |
Related guides
Disclaimer: This guide is general, informational advice only and is not legal, medical, financial, compliance or professional advice. Menu names on platforms change over time; check the platform's own help if something looks different.