How to fix html lang valid on Shopify
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 Shopify
- In your Shopify admin, go to Online Store → Themes.
- Click the '...' (Actions) button next to your active theme and select 'Edit code'.
- In the Layout folder, open 'theme.liquid' (this is your global HTML template).
- Find the opening `<html` tag near the top of the file — it often already has `lang` set to a Liquid variable like `lang="{{ request.locale.iso_code }}"`. If missing or incorrect, update it to `<html lang="{{ request.locale.iso_code }}">` — Shopify's Liquid will automatically output the correct BCP 47 code for each storefront language.
- Click 'Save'. Preview your store and view page source to confirm the rendered `<html>` tag contains a valid language code.
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 Shopify 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