Skip to content
Level A Understandable

WCAG 3.1.1: Language of Page

The default human language of each web page must be programmatically identified using the lang attribute on the HTML element. This enables screen readers to use the correct pronunciation rules and helps translation tools.

What is WCAG 3.1.1 Language of Page?

WCAG 3.1.1 Language of Page is a Level A web accessibility success criterion under the Understandable principle. The default human language of each web page must be programmatically identified using the lang attribute on the HTML element. This enables screen readers to use the correct pronunciation rules and helps translation tools. Common failures include missing lang attribute on the <html> element entirely and using an incorrect or invalid language code. Meeting this criterion is essential for accessible, inclusive web design.

How to Test

  1. Check that the <html> element has a valid lang attribute
  2. Verify the lang value matches the page's primary language (e.g., 'en', 'es', 'fr')
  3. Use a validator to check the lang attribute value is a valid BCP 47 language tag
  4. Test with a screen reader to verify correct pronunciation

Common Failures

Good Example

<!-- English page -->
<html lang="en">

<!-- Spanish page -->
<html lang="es">

<!-- French Canadian page -->
<html lang="fr-CA">

Each HTML element has a valid lang attribute matching the page's primary language. Regional variants (fr-CA) are also valid.

Bad Example

<!-- Missing lang attribute -->
<html>

<!-- Invalid language code -->
<html lang="english">

The first example has no lang attribute, so screen readers must guess the language. The second uses 'english' instead of the valid BCP 47 code 'en'.

Test Your Site for 3.1.1 Compliance

Use our free accessibility tools to check your website against WCAG 3.1.1.

Open Testing Tool

Related Success Criteria

A
3.2.1 On Focus Understandable
A
4.1.1 Parsing Robust

Related Reading

WCAG 2.2 Changes Summary → How to Check Website Accessibility for Free → WCAG Color Contrast Requirements Explained →