# <html> element must have a valid value for the lang attribute

> Canonical HTML version: https://rocketvalidator.com/accessibility-validation/axe/4.8/html-lang-valid
> Attribution: Rocket Validator (https://rocketvalidator.com)
> License: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/)

For multilingual screen reader users who may prefer a language different than the default, the HTML content must contain a valid `lang` attribute or correlate to a valid `lang` code.

Users choose a default language when configuring a screen reader. If the language of a webpage is not provided, the screen reader uses the user's default language. Language settings are a problem for users who speak different languages and visit websites in multiple languages. It is critical to declare a language and guarantee that it is valid in order for website text to be properly pronounced.

Screen readers employ various sound libraries for each language based on its pronunciation and characteristics. Screen readers can readily switch between these language libraries, but only if the documents specify which language(s) they should read. If no language is supplied, the screen reader reads the content in the user's default language, which results in a perplexing accent! When screen readers use the incorrect language library, it is difficult to understand anything.

<h3>What this Accessibility Rule Checks</h3>

Ensures that every HTML document contains a `lang` or `xml:lang` property with a valid value.
