What it is
The lang attribute is a short piece of code added to the very first tag of a page (<html lang="en"> for English, <html lang="es"> for Spanish, and so on) that explicitly states which language the page's content is written in. It's easy to assume this is obvious from the words on the page, but software doesn't read the way people do β it needs this declared plainly rather than guessed from context.
Browsers, translation tools, and search engines all check this one attribute before doing anything language-dependent, rather than analyzing the actual text first.
Why it matters
Browsers use the lang attribute to decide whether to offer an automatic translation prompt at all, and to choose which language to translate from if they do β a missing or wrong lang attribute can mean visitors are offered a translation into their own language when the page is already in it, or aren't offered translation when they'd actually want it. Search engines also use it as a signal for matching a page to the right regional or language-specific search results.
It's a small, invisible detail, but it's also a one-line fix with no downside β there's no reason for any page to skip it once it's launched to real visitors, in any language.
How to fix it
- Identify the primary language of your page's content.
- Add or correct the
langattribute on the<html>tag, e.g.<html lang="en">for English or<html lang="fr">for French β use a standard two-letter language code. - If your site has pages in multiple languages, make sure each page's
langattribute matches that specific page's language, not just your site's main language. - Most website builders (Squarespace, Wix, Webflow, WordPress) set this automatically based on your site's language setting β check your site-wide language setting rather than editing code directly if you're on one of these platforms.
- Re-run your Launch Readiness check to confirm the attribute is now detected with the correct language code.