Responsive Design

Responsive design is the practice of building web pages that adapt their layout to look good on any screen size, from phones to desktops. It relies on flexible layouts, images, and media queries.

Web

Instead of a fixed-width page, a responsive site uses percentages, flexible grids, and media queries so content reflows naturally as the screen changes.

Setting the viewport meta tag is the essential first step, since it tells mobile browsers to render the page at the device's actual width.

Examples

HTML

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

Output:

Tells mobile browsers to use the device width, the foundation of a responsive page.

Learn it in a lesson

See also

Back to the Dictionary