What a viewport is
A viewport is the visible area of a web page on a specific device, and the one line of code responsive design cannot work correctly without.
Glossary
The viewport is the visible area of a web page on a specific device and browser window. The viewport meta tag is a single line of HTML that tells a mobile browser to render the page at the device’s actual width rather than assuming a wider, desktop-style layout and shrinking it to fit. “Viewport” is not a web-only term — it comes from computer graphics, where it describes whatever rectangular region of a document, image or 3D scene is visible on screen; a browser’s viewport applies that same idea to an HTML document.
The layout viewport and the visual viewport are not quite the same thing
Inside a browser, “viewport” refers to two related but distinct sizes. The layout viewport is the width and height CSS media queries and responsive breakpoints measure against — the value the viewport meta tag sets. The visual viewport is the area visible after a user pinch-zooms in or out, which can be smaller than the layout viewport without changing the page’s underlying CSS layout. Day-to-day responsive design work needs only the layout viewport; the visual viewport matters mainly for code that reacts to zooming itself, such as a fixed toolbar that stays visible on screen regardless of zoom level.
Why this one line of code matters so much
A responsive layout, built with CSS that adapts at different screen widths, applies as intended only if the browser renders the page at the device’s real width in the first place. Without the viewport meta tag, a mobile browser defaults to treating the page as a much wider desktop layout, then zooms the whole thing out to fit the screen — the responsive breakpoints never trigger, and the page displays as a shrunken, hard-to-read desktop layout rather than the mobile-optimised version that was built.
Why the viewport meta tag is worth checking directly, not assuming
A site can have extensive, correct responsive web design (RWD) CSS and still fail completely on mobile if this single tag is missing or misconfigured. That is why it is one of the first, fastest things to check on a site that “looks broken on phones” despite an apparently solid responsive build. Viewing a page’s source and confirming the viewport meta tag is present, and set to the device’s actual width, takes moments and rules out this common failure before looking anywhere else. An SVG image embedded in the page has its own separate viewport concept — the visible region of the SVG’s internal coordinate system — unrelated to the HTML viewport meta tag and outside this check.
What to do next about a missing viewport tag
For where this kind of foundational technical configuration sits in a build, website design services covers the scope this fits inside. The layout viewport is what a responsive breakpoint measures against; the glossary defines the related terms. Another piece of markup that works unseen is semantic HTML, which describes what content is, not how it looks.