How to fix html lang valid on Webflow

Add a valid BCP 47 language code to the `lang` attribute on your site's `<html>` element so browsers and assistive technologies know what language your content is written in.

Steps for Webflow

  1. In the Webflow Designer, click the 'W' logo (top-left) → Project Settings → General tab.
  2. Scroll to the 'Localization' or 'SEO' section. Under 'Language', set your primary site language — Webflow will inject this as the `lang` attribute on the `<html>` element.
  3. If you use Webflow Localization (multi-language), each locale page will receive its own correct `lang` attribute automatically.
  4. For a custom `lang` value not available via the UI, go to Project Settings → Custom Code and add a script that rewrites `document.documentElement.lang` — though this is rarely needed.
  5. Publish your site and verify via page source or axe DevTools.
Official Webflow documentation ↗

What is html lang valid?

Every web page starts with an `<html>` tag, and that tag should include a `lang` attribute that tells browsers, screen readers, and search engines what human language the page is written in — for example, `lang="en"` for English or `lang="fr"` for French. The value must be a valid BCP 47 language tag (a globally recognised standard). When this attribute is missing or contains an unrecognised code, assistive technology cannot determine the correct language automatically. WCAG Success Criterion 3.1.1 ("Language of Page") requires this for Level A conformance — the most basic level of accessibility compliance.

Screen readers use the `lang` attribute to select the correct voice, pronunciation rules, and text-to-speech engine for your content. Without a valid value, visually impaired shoppers may hear your product descriptions read back in the wrong language or with completely garbled pronunciation — making your store unusable for them. Beyond accessibility, missing or invalid language declarations expose you to legal risk under accessibility laws (ADA, EN 301 549, and similar regulations in many countries) that increasingly cover commercial websites and online stores. Search engines also use the declared language to serve your pages to the right regional audiences, so fixing this can indirectly protect your international SEO. The fix itself takes under five minutes and requires no coding skill on most platforms.

See the complete Html lang valid guide for every platform and the full background.

Not sure if your Webflow store has this?

Run a free SEOLZ scan — we’ll find html lang valid and every other issue across your whole site.

Scan my site free

Fix html lang valid on another platform