Get the viewport meta tag right. Pick a preset — standard, edge-to-edge for notched phones, or keyboard-resizes-layout — or set each option yourself, and copy the finished tag. The generator warns you if a setting would stop people zooming, which is an accessibility failure. It runs in your browser.
| Option | Use |
|---|---|
| width=device-width | Always — lays out at the device's width |
| initial-scale=1 | Always — starts at 1:1 |
| maximum-scale / user-scalable | Avoid — blocks zoom |
| viewport-fit=cover | Edge-to-edge designs on notched phones |
| interactive-widget | Control on-screen keyboard resizing |
<meta name="viewport" content="width=device-width, initial-scale=1"> — that's right for almost every site.
No. user-scalable=no or a low maximum-scale blocks people with low vision from zooming, fails WCAG, and iOS ignores it anyway.
It lets your page draw under the notch and rounded corners. You then need padding using env(safe-area-inset-top) and friends so content isn't hidden.
It controls how the on-screen keyboard affects layout in Chrome on Android — useful if a fixed footer or chat box jumps when the keyboard opens.
No. The tag is generated in your browser.
Without a viewport meta tag, mobile browsers assume a desktop page and lay it out at around 980 CSS pixels wide before shrinking it to fit, so text is tiny and media queries never trigger. width=device-width with initial-scale=1 tells the browser to use the device's real width at 1:1, which is all most sites need. The generator builds the content attribute from the options that are set and leaves the rest out, because every unnecessary option is a chance to break something. It warns on the two settings that cause real harm: user-scalable=no and a maximum-scale below 5 stop people pinching to zoom, which fails WCAG 1.4.4 Resize Text and is ignored by iOS Safari anyway. viewport-fit=cover extends the page under a phone's notch and rounded corners, which then needs padding from the env(safe-area-inset-*) CSS variables, and the tool says so. interactive-widget controls whether the on-screen keyboard resizes the visual viewport, the layout viewport, or overlays the page, which matters for layouts with fixed footers. The tag is generated in the page.