Skip to content
BENIBIX Learn

Viewport vs Viewport Meta Tag

People think the viewport and the viewport meta tag are the same thing, and they are not. The viewport is the part of the page you can see on the screen. The viewport meta tag is one line of HTML that tells a phone how wide that view should be. The tag sets the viewport; it is not the viewport.

Design🌐 Web Design

Viewport

The part of a web page you can see on the screen right now.

The viewport is the part of a web page you can see on the screen right now. On a phone it is small and tall; on a desktop it is wide. A phone needs one line of HTML, the viewport meta tag, to show a page at its real width. Without it, the phone shows a tiny zoomed-out desktop page.

Example
Jack opens a site with no viewport tag on his phone. The page is tiny, and he has to pinch to read it.
Why it matters
Each layout that fits the screen needs it. Without the tag, phones skip the breakpoints.
Full entry
Development🌐 Web Development

Viewport Meta Tag

One line of HTML that makes a page fit the width of a phone screen.

The viewport meta tag is one line of HTML that tells a phone how wide to lay out the page. It goes in the head of the page. Without it, many phones pretend the screen is as wide as a desktop and shrink the page down. With width=device-width, the page is laid out at the phone's real width. Media queries for small screens only work once this line is there.

Example
Jack's new site looks tiny on his phone, and his mobile styles never kick in. He adds the viewport tag, and the page fits.
Why it matters
It is the first step of any page that works on phones. Without it, responsive design does not work at all.
Full entry

In one line

Viewport
The part of a web page you can see on the screen right now.
Viewport Meta Tag
One line of HTML that makes a page fit the width of a phone screen.

These live in different corners of the glossary (Design and Development), which is exactly why they get confused.