Free scan

Fix "Invalid page language code" in HTML

Why it's a problem

The lang attribute on <html> tells screen readers which voice and pronunciation rules to use. A code that does not exist (“en-ENG”, “english”, a typo) is as good as none: the text may be read with another language's pronunciation.

How to fix it — HTML

Use a valid language code: “en”, optionally followed by a region (“en-GB”, “en-US”). Also check the code matches the content's language, especially on a multilingual site.

Avoid
<html lang="french">
Correct
<html lang="fr">
<!-- ou avec la région : -->
<html lang="fr-FR">

Check your site in 30 seconds

Conformly detects this kind of issue across all your pages, continuously, and alerts you on every regression.

Free scan

Other fixes