# <html> element must have a lang attribute

Source: https://www.fixreports.com/issues/html-has-lang

WCAG 3.1.1 Language of Page · Level A

The page doesn't declare its language, so screen readers may read it with the wrong pronunciation.

## What this rule checks
Ensure every HTML document has a lang attribute.

## Why it matters
WCAG 3.1.1 requires the page language to be set.

## How to fix it
### On any website
1. Add a lang attribute to the <html> element, for example <html lang="en">.

### On Shopify
1. In layout/theme.liquid, make sure the opening tag reads <html lang="{{ request.locale.iso_code }}">.

### On WooCommerce and WordPress
1. Add a lang attribute to the <html> element, for example <html lang="en">.

## How to check the fix
- Re-scan and confirm html-has-lang passes.

## Sources
- axe-core rule documentation (Deque): https://dequeuniversity.com/rules/axe/4.13/html-has-lang
- Understanding WCAG 3.1.1 (W3C): https://www.w3.org/WAI/WCAG22/Understanding/language-of-page
