Audit rules
HTML Language Attribute
The <html> element has no lang attribute, or its value is not a valid BCP 47 tag such as en, en-US or zh-Hant-TW. In a QuikSEO audit, a failure has warning severity and counts against the score. The exact condition, its exceptions and its sources follow below.
document.langWarning01 — Definition
How This Rule Is Checked
The rule is a pure function of the fetched page: no extra requests, no account settings. The same input always gives the same result.
Rule Severity and Score
- Rule id
document.lang- Group
- Document
- Severity of a failure
- Warning
- Counts in the score
- Yes, whenever it applies to the page
- Required for a score
- No
- Replaces the check
language
Condition and Exceptions
- Condition
- <html lang> missing or not a valid BCP 47 tag (language 2-3 letters, optional script/region, e.g. en, en-US, zh-Hant-TW) → fail
- Exceptions
- —
Sources
02 — Document
Other Rules in This Group
The other checks of the same group, each with its own condition and sources.
- Character Encoding Declarationdocument.charset
- Deprecated HTML Tagsdocument.deprecated_tags
- Doctypedocument.doctype
- Favicondocument.favicon
- Inline CSSdocument.inline_css
- Meta Keywordsdocument.meta_keywords
- Meta Refreshdocument.meta_refresh
- Meta Viewportdocument.viewport