Viewport
The viewport is the visible area of a web page in the browser window — what fits on screen without scrolling. On mobile, the viewport meta tag controls how the page is scaled.
Web
Viewport size varies by device, which is why responsive design adapts to it. CSS units like vw (1% of viewport width) and vh (1% of viewport height) are based on the viewport.
Adding the viewport meta tag is essential for mobile sites; without it, phones render pages at a wide desktop width and shrink them down.
Examples
CSS
.hero {
height: 100vh;
width: 100vw;
}Output:
Makes the hero section fill the full height and width of the viewport.