On-page and content
How to fix a missing lang attribute
These pages do not declare which language they are in. Search engines guess, screen readers pick a pronunciation, and browsers offer the wrong translation.
What it is, and what it costs
The
lang attribute on <html> states the page's language. Missing it mostly hurts accessibility (a screen reader may read English text with the wrong voice) and removes a small hint search engines use to serve the right audience.How to fix it
Add the attribute to the <html> element, for example <html lang="en">. Most themes set it from a site-language setting; a hand-built page needs it added to the template.
How to check your site
View source and check the opening <html> tag for lang.
Questions people ask
- What about multilingual sites?
- Set
langto each page's actual language, and usehreflangto connect the language versions.
Does your site have this?
Check your site to confirm each page declares its language.
See also
- How to fix title tag problemsThe title tag is the line people read in search results, and the strongest single signal on the page about what it is for. Four things go wrong with it, and a site with one of them usually has two. Each is below, with what it costs and how to put it right.
- How to fix meta description problemsThe meta description is the sentence under your link in search results. It is not a ranking factor, which is exactly why it gets neglected — and it is what decides whether anybody clicks the result you worked to earn. Three faults account for almost all of it.
- How to fix H1 heading problemsThe H1 is the visible heading that tells a reader — and a search engine — what a page is about before either goes any further. Three faults are common, and a template is behind most of them, which means one fix usually clears the whole site.
- How to fix a broken heading structureThe headings on these pages skip levels, for example an H4 directly under an H2. Screen readers use the heading outline to navigate, and search engines use it to understand how a page is organised.