Lesson 21 / 28

Viewport & Responsive Basics

The single tag that makes mobile layouts work.

The viewport tag

This tells mobile browsers to match the CSS layout to the device's actual screen width.

<meta name="viewport" content="width=device-width, initial-scale=1.0">

Without it, zoomed out

Skip this tag and mobile browsers render a fake wide desktop page, then shrink it — tiny, zoomed-out text.