Skip to the content
Start free

The page language is not set

The html tag has no lang attribute, or one that is not a language code, so screen readers and translators may guess wrong.

Medium priority Languages and countries

Why it matters #

lang="en-GB" on the html tag tells browsers, screen readers and translation tools which language the page is in. Screen readers use it to pick the right voice and pronunciation, and the WCAG accessibility guidelines make it a level A rule, the most basic level.

Google Search Central says Google works out a page's language from its visible content, not from the lang attribute. Browsers do use it when they offer to translate a page, and a wrong code can bring up a translation offer nobody needs.

How to fix it #

Put the language code on the html tag: <html lang="en-GB"> for British English, or <html lang="cy"> for Welsh. The code is a language (ISO 639-1), optionally followed by a hyphen and a country.

On WordPress, the theme prints it from Settings, General, Site Language. Set that to English (UK) if that is your language. Check with the Meta Tag Checker.

What it looks like, and fixed #

The problem
<!DOCTYPE html>
<html>

No lang attribute, so screen readers and browsers have to guess the language.

Fixed
<!DOCTYPE html>
<html lang="en-GB">

A language code, optionally with a country: en-GB for British English, cy for Welsh.

Fix it with your AI assistant #

Paste this into ChatGPT, Claude, Gemini or your coding agent. Fill in the words in [square brackets] first. It checks before it changes anything, changes only this, and tells you how to prove it worked.

Your instruction for the AI
Help me set the page language on [your website address], built with [your platform, e.g. WordPress]. A checker says the html tag on [the page address] has no lang attribute, or one that is not a valid language code. First, read the first lines of the page source (or ask me to paste them) and report the html tag exactly. Ask me which language the page is in. Explain plainly what is wrong. Then give me the exact fix: a valid code on the html tag, such as en-GB for British English or cy for Welsh, set at its source (site language setting, theme template or page files). Rules: back up the template first, change only the lang attribute, keep the other attributes on the html tag, and keep page addresses. Show me how to mark passages in other languages with lang too. Give exact steps or code and where it goes. Finally, tell me to re-check with the URSY.com Meta Tag Checker at ursy.com/meta-tag-checker/.

We find the problems, and help you fix them

  1. Check Run a free tool or the full audit.
  2. Fix it with your AI Download your AI Fix Pack and drop it into ChatGPT, Claude or Gemini. A free account is enough.
  3. Re-check Come back, check again, and watch each fix turn green.

How the AI Fix Pack works, with a sample to download

Fix it on your platform #

WordPress

Set Settings, General, Site Language to English (UK). If the tag is still empty, the theme's header file should call language_attributes() in the html tag.

Shopify

Check the store's default language in the languages settings. Most themes print it in theme.liquid with lang="{{ request.locale.iso_code }}".

Wix

Check the site language in your site's language settings. Wix writes the lang attribute from it.

A hand-made site

Add lang="en-GB" (or your language code) to the html tag of every page or template.

Check it is fixed #

Run the Meta Tag Checker again: it should find a valid language code on the html tag, such as en-GB.

Official source #

W3C: Declaring language in HTML

Questions #

Does Google use the lang attribute to rank pages?

Google says it works out the language from the visible text. The attribute matters for screen readers, browsers and translation offers, and for accessibility rules.

Should I use en or en-GB?

Both are valid. en-GB is more exact, and screen readers can use it to pick a British voice.

More problems in Languages and countries

See every problem in the library

For AI assistants and developers: Instructions for AI · Developers · How to cite URSY.com