Skip to content

missing-html-lang

Added in 0.2.9 · Related issues · View source

What it does

Checks for <html> tags that do not declare a non-empty lang attribute.

Why is this bad?

The lang attribute on <html> declares the primary language of the document. Screen readers use it to select the correct pronunciation rules, and search engines use it to index the page for the right audience.

Example

<html>
</html>

Use instead:

<html lang="en">
</html>

References