See plans and pricing

The HTML element must have a lang attribute

Estimated effort: about 5 minutes.

The page's HTML needs to declare which language it is written in so screen readers use the correct pronunciation rules. Without this, a screen reader may read the text using the wrong language's sound library, making it hard or impossible to understand.

How to fix it

  1. View the page's rendered HTML and locate the opening <html> tag.
  2. Add a lang attribute with the correct language code, e.g. <html lang="en"> for English.
  3. If the site serves a specific regional variant, use the more specific code, e.g. lang="en-US" for American English.
  4. If a section of the page is written in a different language than the rest of the page, add a lang attribute to that specific element too, e.g. <span lang="es">.
  5. Confirm the attribute is present by viewing the page source after saving.

Before and after

Before

<html>

After

<html lang="en">

View the full rule reference from Deque University

See plans and pricing