Ensure the lang attribute of the html element has a valid value

Specifying a valid BCP 47 language helps screen readers announce text properly. Lighthouse reports when the <html> element does not have a valid value for its lang attribute.

How to fix this problem

To fix this problem, use valid language codes in lang attributes. The language specified in the HTML document must be one of the valid languages to ensure text is pronounced correctly for screen reader users. For example, this sets the language of the document to English:

<html lang="en">

Learn more in lang attribute must have a valid value.

More information

Last updated: Improve article