Blog Post

Attributes of No Language

The Zombie: No lang attribute on the <html> element

Always a Zombie? No

Severity: Medium

Why is it a Zombie: If the site’s language and the visitor’s language match it’s not an issue. If they don’t match (and you as a developer never know for sure whether they’ll match or not), the browser may have to guess as to what language it is and may or may not present the right options for translation.

Cure the Zombie by: Always add a lang attribute to your html element e.g. lang=“en” for English, lang=“es” for Spanish, lang=“fr” for French etc.