QamoosTech
FrontendBeginner

Viewport

PronunciationVYOO-port

Definition

The visible area of a web page inside the browser window or on a phone screen.

Where you hear it

CSS (vw, vh), media queries, and mobile testing.

Examples

  • The menu should collapse when the viewport is narrower than 600px.
  • Add the viewport meta tag, or the page will look tiny on phones.

Common mistake

Confusing the viewport with the full page. The page can be much taller than the viewport.