Set the HTML language
lang on <html> tells browsers and crawlers the language of the page. Follow the steps below on your stack, then re-check the live URL.
lang on <html> tells browsers and crawlers the language of the page.
We remember this on this browser so the next guide opens with the same CMS.
At a glance
| Time | ~5 min |
|---|---|
| Category | SEO |
| Steps | 2 |
| Stacks | WordPress, Shopify, Webflow, Next.js, HTML, more |
Steps
Set lang on the <html> element to match the visible text (en, de, es, …).
Use a region variant only when you mean it (en-GB, pt-BR).
In HTML / static
Add lang="en" (or de, es, …) on the <html> element.
Snippet
<html lang="en">
FAQ
- What does “Set the HTML language” fix?
- lang on <html> tells browsers and crawlers the language of the page.
- How long does this usually take?
- About 5 minutes on most CMS and code stacks when you already have access to edit the page.
- Where do I start?
- Start with: Set lang on the <html> element to match the visible text (en, de, es, …). Then use the platform picker on this page for placement notes.