🌐Viewport
Also known as Browser Viewport, Visible Area
The part of a web page you can see on the screen right now.
Think of it like
It is like a window in a wall. You only see the part of the garden the window shows.
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.
Definition
Example code
html
<meta name="viewport" content="width=device-width, initial-scale=1">Common mistake
Key takeaways
- 1What you see now. The visible area.
- 2One line of HTML. The viewport tag.
- 3Never block zoom. Let people pinch.