MobileCheck

What is the viewport meta tag?

Glossary · Updated October 23, 2026 · Also called: meta viewport, width=device-width

Definition The viewport meta tag is an HTML element in the page head that tells mobile browsers how wide the layout viewport should be and how far the page may be zoomed. The standard value is <meta name="viewport" content="width=device-width, initial-scale=1">. Without the tag, Safari on iPhone and Chrome on Android lay the page out at 980 CSS px and shrink it to fit the screen.

How does the viewport meta tag work?

Early phone browsers had to show sites built only for desktops, so they invented a virtual 980 px wide window and zoomed out. The viewport meta tag is how a page says "I'm built for small screens, use the real width". It's read only by mobile browsers; desktop browsers ignore it.

The content attribute is a comma-separated list:

Example

<!-- In <head>, once per page -->
<meta name="viewport" content="width=device-width, initial-scale=1">

Avoid this version, which disables zoom:

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">

Other mistakes worth checking: two viewport tags on one page (often one from a theme and one from a plugin), a tag added by JavaScript after the page has rendered, and old extras such as shrink-to-fit=no, which only mattered in iOS 9 and can be dropped.

On iPhone vs Android

Since iOS 10, Safari lets people pinch-zoom even when user-scalable=no is set. Chrome on Android respects it unless the user turns on "force enable zoom" in its accessibility settings. So disabling zoom hurts Android users most, and gains nothing on iPhone.

How MobileCheck checks it

MobileCheck flags three problems with this tag: no viewport meta tag at all (the phone renders a roughly 980 px desktop layout and shrinks it), a fixed width instead of width=device-width, and zoom disabled with user-scalable=no or a maximum-scale below 2.

Guides and tools

Sources

  1. MDN: <meta name="viewport">
  2. web.dev: Responsive web design basics

All 27 glossary terms, A to Z