How to fix html has lang on Shopify
Add a valid `lang` attribute to the `<html>` element so browsers and assistive technologies know what language your page is written in.
Steps for Shopify
- In your Shopify admin, go to Online Store → Themes.
- Next to your active theme, click Actions → Edit code.
- In the left-hand file tree under 'Layout', click `theme.liquid` (this is your root template).
- Find the opening `<html` tag near the top of the file.
- Shopify themes typically already output `<html lang="{{ request.locale.iso_code }}">` using a Liquid variable — if this variable is present, the lang is already dynamic and correct. If the tag reads simply `<html>` or has a hard-coded lang value, replace it with `<html lang="{{ request.locale.iso_code }}">` to dynamically match the store's active language.
- Click Save. Verify by viewing source on any storefront page.
<html lang="en">What is html has lang?
Every web page starts with an `<html>` tag. The `lang` attribute on that tag (e.g., `<html lang="en">`) declares the primary human language of the page's content. Without it, screen readers, browsers, and translation tools have to guess the language — and they often guess wrong. This is a WCAG 2 Success Criterion 3.1.1 ("Language of Page") requirement, meaning it is part of an internationally recognised accessibility standard.
Screen readers use the `lang` attribute to select the correct voice engine and pronunciation rules — a missing or wrong value means a visually impaired customer hears your product descriptions read aloud in the wrong accent or language, making your store unusable for them. Failing WCAG 3.1.1 is an accessibility violation that can expose your business to legal risk under laws such as the ADA (US), the European Accessibility Act (EU), and the Equality Act (UK). Search engines also use the declared language to correctly index and serve your pages in the right regional search results, so a missing `lang` can quietly hurt your international organic traffic. It is also one of the fastest accessibility wins available — a one-line change that immediately satisfies a legal compliance checkpoint.
See the complete Html has lang guide for every platform and the full background.
Not sure if your Shopify store has this?
Run a free SEOLZ audit — we’ll find html has lang and every other issue across your whole site.
Scan my site free