</> Code Corner

CSS · CSS Responsive · Lesson 66

RWD Viewport

The viewport is the user's visible area.

The viewport is the user's visible area of a web page. It varies with the device and is smaller on a phone than on a computer.

Example

<meta name="viewport" content="width=device-width, initial-scale=1.0">
  • width=device-width sets the page width to follow the screen width of the device
  • initial-scale=1.0 sets the initial zoom level when the page is first loaded

Size content to the viewport

Keep reading “RWD Viewport”

Sign up to read the full lesson (1 more parts), try every example in the live editor, and take the 5-question quiz.

Chat with us 👋