Configure the HTML <meta name="viewport"> tag for mobile browsers. Control zoom, scaling, and notch safe-area behavior.
Previews below render a tiny test page inside device-sized frames using your current viewport settings. The inner page uses the same <meta> tag you're building.
| Attribute | Purpose |
|---|---|
width | Sets the viewport width. device-width matches the device's logical width. |
initial-scale | Zoom ratio at first render. Always pair device-width with initial-scale=1. |
minimum-scale / maximum-scale | Zoom bounds. Setting a max hurts accessibility β prefer not to restrict. |
user-scalable | Whether users can pinch-zoom. Setting no is an accessibility issue. |
viewport-fit | iOS only. cover enables rendering behind the notch β pair with env(safe-area-inset-*). |
interactive-widget | Controls how mobile keyboards affect the viewport. New in Chrome 108+. |