Back

html-has-lang

<html> element must have a lang attribute

Why it matters

Screen readers use the page's declared language to choose correct pronunciation rules. Without it, the page may be read in the wrong accent or voice entirely.

How to fix it

Add a lang attribute to the root <html> element matching the page's primary language.

Example

<html lang="en">
Technical reference (Deque University)
<html> element must have a lang attribute | Pallyfi Accessibility Guidance