What Is a Viewport? The Browser Space Your Website Can Use
Is a website viewport the same as the whole screen? The viewport is the visible area available for the document.
1:47 · No narration: the video shows each step as text on screen, and every step is written out below, with buttons that jump the video to it.
Prefer YouTube? Watch this video on our YouTube channel (opens in a new tab).
The six points in the video
This is a silent video. The headings, explanations and labels below reproduce the information on screen.
-
Step 1: Start with the visible page area
The browser displays part of a document within a viewport.
On-screen labels: Document content; Visible area; Scrolled content.
-
Step 2: Window size can change it
A smaller browser window gives the page less layout space.
On-screen labels: Full browser window; Resized window; Available width.
-
Step 3: Screen pixels need context
Pixel density and CSS pixels affect how sizes are represented.
On-screen labels: Device pixels; CSS pixels; Display density.
-
Step 4: Mobile views need configuration
A viewport setting helps mobile browsers use a suitable page width.
On-screen labels: Viewport metadata; Device-width layout; Mobile presentation.
-
Step 5: Zoom changes the experience
Magnification can alter which part of the document is visible.
On-screen labels: Zoomed view; Visible content; Usable controls.
-
Step 6: Test more than one width
A page should remain useful across the visitor views it supports.
On-screen labels: Narrow view; Wide view; Real customer task.
A practical check for your business
Test the website at a range of usable widths and with the browser interface present. The available viewing area matters more than assuming that every device of one type has the same layout.
Sources and further detail
Common questions
Is a website viewport the same as the whole screen?
The viewport is the visible area available for the document. Test the space the visitor actually has.
Go further
More video tips
All 205 videos →
Responsive Breakpoints Explained: When a Website Layout Changes
Breakpoints, explained.
Third-Party Website Widgets: 6 Checks Before Adding Another One
Review the services you embed.