HTML lang attribute is an important SEO check in the Accessibility (WCAG) category. This is a high-priority SEO issue that should be addressed soon. It has a significant impact on your SEO performance.
This is the smallest high-value fix in the whole audit. One attribute — lang on your <html> tag — tells browsers, screen readers, and search engines what language the page is written in. Get it wrong or leave it off, and a screen reader may read English content in a French voice, and Google has to guess at something you could simply have told it. Five minutes, real return. I would fix this before I finished my coffee.
What This Check Is Really About
The check verifies that your document declares its language: <html lang="en">, or the correct code for whatever language the page is in. WCAG 3.1.1 requires it for accessibility, and it uses a standard BCP 47 tag — en, en-US, en-GB, tr, de, and so on. If part of a page is in a different language, that section should carry its own lang attribute too.
When this fails, the attribute is usually missing entirely, set to a placeholder the theme shipped with, or mismatched — a page of English content declaring lang="en" on a site whose template still says something else.
Why This Matters for SEO and Accessibility
- Screen readers switch voice and pronunciation based on it. The wrong language turns assistive technology into gibberish for the user relying on it.
- It confirms language to search engines, supporting correct indexing and reducing the chance your page is served to the wrong-language audience.
- It underpins hreflang. On a multilingual site, per-page
langand your hreflang annotations need to agree, or you send mixed signals about who each page is for. - It is a WCAG requirement, so it carries compliance weight beyond SEO alone.
One Source, Every Language: A Lesson From the CD-ROM Days
I learned to respect the language tag long before the web made it an attribute. In the ’90s I built multi-language CD-ROM projects — the kind that shipped one disc carrying the same product in six languages, and let the user pick at the start. The unglamorous truth of that work was that every asset, every string, every screen had to be tagged with which language it belonged to. Miss a tag on one caption and a German user got a stray line of Italian, and there was no patching a pressed disc. You marked the language of everything, or the whole thing quietly broke for someone.
The web version of that discipline is exactly this attribute. Declaring the language of your content is not bureaucratic box-ticking; it is the thing that lets one system serve many audiences correctly. I have watched what happens when language is left implicit — the machine guesses, and it guesses wrong for the person who can least afford it. Tag it explicitly and you never have to hope.
How to Fix This in WordPress
Difficulty Level: EASY – This fix is straightforward and can typically be completed by anyone with basic WordPress knowledge.
Estimated Time: 5 min
- Set your site language first. Under Settings → General, “Site Language” drives WordPress’s
language_attributes()output — set it correctly and a well-built theme emits the rightlangautomatically. - Confirm the theme uses it. Your
<html>tag inheader.phpshould call<html <?php language_attributes(); ?>>, not a hard-coded value. If it is hard-coded, that is your bug. - View source and check that the rendered
<html>tag shows the language you expect, on both a page and a post. - Handle multilingual sites with a plugin like Polylang or WPML, which set per-page
langand manage hreflang together so the two stay consistent. - Tag inline exceptions — quote or phrase in another language — with a local
langattribute on that element.
Recommended Tools & Plugins
- Yoast SEO – Comprehensive SEO plugin with built-in checks
- Rank Math – Feature-rich SEO plugin with detailed analysis
- Google Search Console – Free tool to monitor your site’s search presence
- SEO Roadmap – Complete SEO audit and action plan tool
Common Mistakes to Avoid
- Leaving a hard-coded placeholder
langin the theme that does not match the site’s actual language - Using an invalid or made-up code instead of a standard BCP 47 tag
- On a multilingual site, letting per-page
langand hreflang disagree - Forgetting to tag inline foreign-language passages, so a screen reader mispronounces them
This guide is part of the SEO Roadmap knowledge base – your complete resource for WordPress SEO optimization.
Last modified: August 2, 2026
United States / English
Slovensko / Slovenčina
Canada / Français
Türkiye / Türkçe