Skip to content

Viewport meta tag

highusability-viewportreviewed

Without it a phone renders your page as a zoomed-out desktop layout, and no amount of responsive CSS applies. One line, in every document.

What it is

The viewport meta tag tells a mobile browser how wide to consider the page. This check fails when the tag is missing, and also when it is present but does not set width=device-width.

The second case is the one that surprises people: a viewport tag with the wrong contents is not better than no tag, and it looks correct in a source listing.

Why it matters

A phone browser with no instruction assumes it is rendering a desktop page. It lays the document out at around 980 pixels wide and scales the result down to fit the screen, which produces a readable-shaped page made of unreadable text.

Crucially, your media queries never fire. The browser believes the viewport is 980 pixels, so a responsive stylesheet written for small screens simply does not apply — the mobile layout you built is present in the CSS and invisible on the device. It is one line, and without it the rest of the responsive work does nothing.

How to fix it

with a reference doc
html
<meta name="viewport" content="width=device-width, initial-scale=1">

Reference documentation

Related checks

4
lowTap target sizeThis check measures the rendered size of interactive elements — links, buttons, form controls — and the gaps between them, flagging anything smaller than 44 by 44 pixels or closer than 8 pixels to its neighbour.highColor contrastThis reads Lighthouse's own color-contrast audit: whether text has enough contrast against its background, judged by the WCAG formula rather than eyeballed. The threshold is 4.5:1 for normal text and 3:1 for large text (18pt+, or 14pt+ bold).highCumulative Layout Shift (CLS)Cumulative Layout Shift (CLS) scores how much visible content unexpectedly moves during a page's lifetime, weighted by how much of the viewport shifted and how far. A score under 0.1 is good; 0.1-0.25 is graded medium here, above 0.25 is high.lowModern image formatsThis check looks at the images a page actually loaded and counts the ones still served as PNG or JPEG where a modern format would do the same job smaller.

This is one of the 75 checks the scanner runs. See what we check for the full list, every severity weight, and how the score is computed from them.

See whether your own site passes viewport meta tag.

One page, all 75 checks, free. No account, no card.

Check this on my site