Free auditStart free
GlossaryGlossary · Performance

Viewport meta tag

The viewport meta tag tells mobile browsers how wide to render a page. Use device-width, test real breakpoints, and keep zoom available.

3 min
read
3
sources
Oct 24, 2026
updated
Scaplet Editorial Team
author
In one line

The viewport meta tag tells a mobile browser how to size and scale a page's layout viewport. For a responsive page, MDN's recommended setting is <meta name="viewport" content="width=device-width">. Without it, mobile browsers may render the page in a wider virtual viewport (MDN gives 980px as an example) and shrink it to fit. The tag helps mobile rendering; it is not a ranking guarantee.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode
01Check it

The responsive default

Put one viewport declaration in the document <head>. width=device-width matches the viewport to the device's width. initial-scale=1 is common, but MDN says it is usually unnecessary; add it if overflowing content causes unwanted shrinking and you want the page to start at 100% zoom. Then use fluid layouts and CSS media queries to adapt components to the available width.

A fixed-width declaration such as width=320 can cause problems when the browser renders the page at a larger size, MDN notes, so browsers expand the viewport to fill the screen. Without any tag, some mobile devices render the page in a wider virtual viewport and shrink it to fit, and users then zoom and pan. MDN says this suits pages that are not optimized for mobile but defeats media queries that kick in below the virtual width. device-width is a starting point, not a complete mobile design: a wide table, fixed-width image, or oversized element can still overflow.

A typical responsive page head
<head>
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>Example page</title>
</head>
02At a glance

What it changes, and what it does not

It helps with

Matching the layout viewport to the device width

It does not do
Automatically make a desktop layout responsive
It helps with

Giving CSS breakpoints a useful viewport width

It does not do
Make text, buttons, or navigation usable by itself
It helps with

Helping browsers render a mobile page at an appropriate scale

It does not do
Guarantee mobile rankings or a ranking boost

Google's supported meta tags documentation says the presence of a viewport tag indicates that a page is mobile friendly. Google's mobile-first indexing guidance also says Google uses the mobile version of a site's content, crawled with the smartphone agent, for indexing and ranking, and that Google recommends responsive web design. These are reasons to make the mobile page work well and expose equivalent content, not a promise that adding this tag alone improves position.

03How it works

Check the page on narrow screens

  1. 1

    Inspect the delivered head

    View the page source or rendered DOM and confirm a viewport tag appears in <head> with width=device-width. Check the live page, not only the template file.

  2. 2

    Test real content widths

    Use browser responsive mode at a narrow phone width, then test a physical phone if possible. Look for horizontal page scrolling, clipped dialogs, fixed-width tables, and content hidden behind sticky elements.

  3. 3

    Try the main actions

    Tap navigation, forms, and primary buttons. Confirm controls have room to use and that users can zoom. A layout that technically fits can still be hard to operate.

  4. 4

    Check what Google can access

    Use Search Console URL Inspection to test the live URL and inspect the rendered mobile page. Confirm important text, links, images, metadata, and structured data are available on mobile too.

04Checklist

Common viewport mistakes

First2
Using a fixed viewport width, then shrinking the whole desktop page instead of building a flexible layout.
Adding the tag but leaving images, code blocks, tables, or navigation wider than the viewport.
Next1
Disabling user zoom with user-scalable=no.
Then1
Removing primary content from the mobile layout. With mobile-first indexing, Google uses the mobile version for indexing; keep its important text and links equivalent to desktop.

For the broader approach, see responsive design and web accessibility. The viewport tag is one line in the head; the quality check is whether the actual page remains readable, operable, and complete at the widths your visitors use.

Sources · 3

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • google.com
  • mozilla.org
  1. 01Mobile-first indexing best practices - Google Search Centraldevelopers.google.com · checked 2026-10-24
  2. 02Meta tags and attributes that Google supportsdevelopers.google.com · checked 2026-10-24
  3. 03The viewport meta tag - MDNdeveloper.mozilla.org · checked 2026-10-24
Questions

Asked a lot.

3 questions people ask next, answered from the sources on this page.

01What should the viewport meta tag contain?

For a responsive page, MDN's recommended baseline is width=device-width; adding initial-scale=1 is common but usually unnecessary. Let users zoom, and use responsive CSS to adapt the layout.

02Does a viewport meta tag improve Google rankings?

Google documents the tag as an indication that a page is mobile friendly. That does not guarantee a ranking increase: the rendered page and its content still matter.

03Why does my page still scroll sideways with the tag?

The tag sets the viewport width but does not shrink content that is wider than it. Check fixed-width containers, images, tables, code blocks, and positioned elements at narrow widths.

Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly