lang and viewport set
The html element has lang and a viewport meta exists.
- Severity
- low
- Tier
- Passive: runs on any URL
- Category
- SEO
- Fix
- Summary below; full runbook in the Fix Kit, Module 01: Ship it
- Id
- lang-viewport
What this means
Passing means the <html> element on your home page has a lang attribute and the head contains a viewport meta tag. Failing means one or both are missing. The first tells screen readers and translators what language the page is in; the second tells a phone to render the page at its own width instead of a shrunken desktop view.
How we test it
We fetch the home page and parse the HTML. We look for lang= on the <html> tag and for <meta name="viewport"> in the head. Both present passes. One present warns. Neither fails.
Why it matters
Mobile rendering and accessibility depend on both. Without the viewport meta, a phone draws the page at desktop width and the visitor pinches to read it, which is the first thing the kit's by-hand phone check looks for. Without lang, a screen reader may pronounce the page in the wrong language, and the kit's automated accessibility check reports a failure before any human reads the page.
The fix
Set <html lang="en"> (or the page's real language) and place <meta charset="utf-8"> followed by <meta name="viewport" content="width=device-width, initial-scale=1"> first in the <head> of every page template, as the kit's head-og-jsonld.html lays out. Confirm with curl -s https://YOUR_DOMAIN/ | grep -c 'name="viewport"' (expected 1) and curl -s https://YOUR_DOMAIN/ | grep -oE '<html[^>]*lang=[^ >]*' showing the attribute.
The full runbook is in the Fix Kit, Module 01.
Prompt for your AI
Paste this into the coding agent that built the app. It reproduces the finding and stops before changing anything; the fix steps are in the kit.
Do not change anything. This is a verification pass. Run: curl -s https://YOUR_DOMAIN/ | grep -oE '<html[^>]*>' and show me the tag. Run: curl -s https://YOUR_DOMAIN/ | grep -c 'name="viewport"' and show me the number. Tell me which of the two is missing. Find the template or layout file that emits the html tag and the head, and tell me its path. List what it would take to add the missing attribute or tag to every page, and stop there. Run both commands again and show me the output. Expected on a passing site: an html tag containing lang=, and the number 1.
Grade your own URL
Every grade lists this check with its evidence for your site. Two free grades a day.