Skip to content
Nazmul Nikhil
Menu

[lang] Attributes Do Not Have a Valid Value (PageSpeed Insights)

PageSpeed flags lang attributes on elements inside the page (not just <html>) with invalid codes. Here's how to fix them.

Nazmul Nikhil

By

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

Published 1 min read
[lang] Attributes Do Not Have a Valid Value (PageSpeed Insights)
Photo: Anne Rosly on Unsplash

In short

You can mark a phrase in another language with lang on any element, for example <span lang="fr">bonjour</span>. This check flags those inner lang values when they aren't valid language codes. Use the same format as on <html>: fr, es, bn, en-GB. Weight 7.

This guide isn't affiliated with or endorsed by Google.

Sources and references

TAGSPageSpeed InsightsLang attributes do not have a valid valueValid langLang attribute on span
Nazmul Nikhil

About the author

Nazmul Nikhil

Head of SEO & Assistant Manager, Digital Marketing at Notionhive

SEO and AI search consultant in Dhaka, Bangladesh, helping small and mid-size businesses in the USA, UK, Australia and Canada.

Need help with this?

Get it fixed with Technical SEO

I find the issues that cost you traffic and fix them, starting with the pages that matter most.

Keep reading

Related articles

All Page Speed & Core Web Vitals posts →

Get the next guide in your inbox

One email when a new SEO or AI search guide goes live.

Ready to grow?

Get a free audit of your website, or book a 30-minute call to talk through your goals.

Nazmul Hasan

Talk to Nazmul directly

Reply within 24h

WhatsApp +880 1682835118
nazmulnikhil@gmail.com