Missing lang attribute on HTML tag
The <html> tag does not have a lang attribute. Browsers, screen readers and search engines do not know the language of the content.
Why it matters
Google may misidentify the target language and serve your page to the wrong users. Screen readers use this attribute to select the synthesis voice.
How to fix
- 1
WordPress handles this automatically
WordPress adds the lang attribute via the language_attributes() function. If it is absent, verify that your theme calls this function in the header.php template.
php<!DOCTYPE html> <html <?php language_attributes(); ?>> - 2
Set the language in Settings
Dashboard → Settings → General → "Site Language". Select your language. WordPress will automatically update the lang attribute.
Ready to fix this issue on your site?
Audit my site for free →