{
    "title": "The page language is not set",
    "description": "The html tag has no lang attribute, or one that is not a language code, so screen readers and translators may guess wrong.",
    "url": "https://ursy.com/issues/html-lang-missing/",
    "canonical": "https://ursy.com/issues/html-lang-missing/",
    "markdown": "https://ursy.com/issues/html-lang-missing/index.md",
    "json": "https://ursy.com/issues/html-lang-missing/index.json",
    "published": "2026-11-29T21:57:25+00:00",
    "updated": "2026-11-30T12:53:05+00:00",
    "language": "en-GB",
    "publisher": {
        "name": "URSY.com",
        "url": "https://ursy.com/"
    },
    "cite": "Name URSY.com and link https://ursy.com/issues/html-lang-missing/",
    "start_here": {
        "page": "https://ursy.com/issues/html-lang-missing/",
        "markdown": "https://ursy.com/issues/html-lang-missing/index.md",
        "json": "https://ursy.com/issues/html-lang-missing/index.json",
        "cite": "Name URSY.com and link the page you used.",
        "doors": {
            "llms_txt": "https://ursy.com/llms.txt",
            "facts": "https://ursy.com/facts.json",
            "mcp": "https://ursy.com/mcp/",
            "openapi": "https://ursy.com/.well-known/openapi.json"
        }
    },
    "issue": {
        "slug": "html-lang-missing",
        "problem": "The page language is not set",
        "summary": "The html tag has no lang attribute, or one that is not a language code, so screen readers and translators may guess wrong.",
        "status": "Live",
        "priority": "medium",
        "category": "international",
        "category_title": "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": [
            "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."
        ],
        "steps": [],
        "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.",
        "found_by": [
            {
                "tool": "meta-tag-checker",
                "name": "Meta Tag Checker",
                "status": "Live",
                "page": "https://ursy.com/meta-tag-checker/",
                "card": "https://ursy.com/meta-tag-checker.json"
            },
            {
                "tool": "seo-checker",
                "name": "SEO Checker",
                "status": "Live",
                "page": "https://ursy.com/seo-checker/",
                "card": "https://ursy.com/seo-checker.json"
            }
        ],
        "full_record": "https://ursy.com/wp-json/ursy/v1/issues/html-lang-missing",
        "source": {
            "url": "https://www.w3.org/International/questions/qa-html-language-declarations",
            "title": "W3C: Declaring language in HTML"
        },
        "cite": "The page language is not set. URSY.com. https://ursy.com/issues/html-lang-missing/"
    },
    "headings": [
        {
            "level": 2,
            "text": "Why it matters",
            "id": "why-it-matters",
            "url": "https://ursy.com/issues/html-lang-missing/#why-it-matters"
        },
        {
            "level": 2,
            "text": "How to fix it",
            "id": "how-to-fix-it",
            "url": "https://ursy.com/issues/html-lang-missing/#how-to-fix-it"
        },
        {
            "level": 3,
            "text": "What the problem looks like",
            "id": "what-the-problem-looks-like",
            "url": "https://ursy.com/issues/html-lang-missing/#what-the-problem-looks-like"
        },
        {
            "level": 3,
            "text": "What it looks like fixed",
            "id": "what-it-looks-like-fixed",
            "url": "https://ursy.com/issues/html-lang-missing/#what-it-looks-like-fixed"
        },
        {
            "level": 2,
            "text": "Fix it with your AI assistant",
            "id": "fix-it-with-your-ai-assistant",
            "url": "https://ursy.com/issues/html-lang-missing/#fix-it-with-your-ai-assistant"
        },
        {
            "level": 2,
            "text": "Fix it on your platform",
            "id": "fix-it-on-your-platform",
            "url": "https://ursy.com/issues/html-lang-missing/#fix-it-on-your-platform"
        },
        {
            "level": 3,
            "text": "WordPress",
            "id": "wordpress",
            "url": "https://ursy.com/issues/html-lang-missing/#wordpress"
        },
        {
            "level": 3,
            "text": "Shopify",
            "id": "shopify",
            "url": "https://ursy.com/issues/html-lang-missing/#shopify"
        },
        {
            "level": 3,
            "text": "Wix",
            "id": "wix",
            "url": "https://ursy.com/issues/html-lang-missing/#wix"
        },
        {
            "level": 3,
            "text": "A hand-made site",
            "id": "a-hand-made-site",
            "url": "https://ursy.com/issues/html-lang-missing/#a-hand-made-site"
        },
        {
            "level": 2,
            "text": "Check it is fixed",
            "id": "check-it-is-fixed",
            "url": "https://ursy.com/issues/html-lang-missing/#check-it-is-fixed"
        },
        {
            "level": 2,
            "text": "Official source",
            "id": "official-source",
            "url": "https://ursy.com/issues/html-lang-missing/#official-source"
        },
        {
            "level": 2,
            "text": "Questions",
            "id": "questions",
            "url": "https://ursy.com/issues/html-lang-missing/#questions"
        },
        {
            "level": 3,
            "text": "Does Google use the lang attribute to rank pages?",
            "id": "does-google-use-the-lang-attribute-to-rank-pages",
            "url": "https://ursy.com/issues/html-lang-missing/#does-google-use-the-lang-attribute-to-rank-pages"
        },
        {
            "level": 3,
            "text": "Should I use en or en-GB?",
            "id": "should-i-use-en-or-en-gb",
            "url": "https://ursy.com/issues/html-lang-missing/#should-i-use-en-or-en-gb"
        }
    ],
    "links": [
        {
            "text": "Google",
            "url": "https://ursy.com/wiki/google/",
            "internal": true
        },
        {
            "text": "Meta Tag",
            "url": "https://ursy.com/wiki/meta-tag/",
            "internal": true
        },
        {
            "text": "ChatGPT",
            "url": "https://ursy.com/wiki/chatgpt/",
            "internal": true
        },
        {
            "text": "W3C: Declaring language in HTML",
            "url": "https://www.w3.org/International/questions/qa-html-language-declarations",
            "internal": false
        }
    ],
    "words": 599,
    "text": "The html tag has no lang attribute, or one that is not a language code, so screen readers and translators may guess wrong. 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 the problem looks like <!DOCTYPE html> <html> No lang attribute, so screen readers and browsers have to guess the language. What it looks like 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, and fill in the words in square brackets: 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/. 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.",
    "source": "https://ursy.com/issues/html-lang-missing/"
}