Skip to main content

Introduction to Responsive Web Design

A page built with responsive web design looks good on every device it reaches.

To get there, the design adjusts itself automatically to the viewport and screen size in use.


Best Experience For All Users

A web page can be opened on a desktop, a tablet or a mobile phone.

Whichever one a visitor picks, the page has to be easy to use and still look good.

Using HTML and CSS, a responsive design automatically resizes, hides, shrinks or enlarges a website to fit all devices.

It rests on three key components:

  • Viewport <meta> tag
  • Flexible layout (grid and flex)
  • Media queries

Example

On desktop this page layout uses a multi-column grid, and on smaller screens it becomes a single column.

Prompt
Create a responsive web page with a header, a sidebar menu, main content, a facts sidebar, and a footer using CSS Grid. Use media queries to stack the layout into a single column on screens smaller than 600px and show a two-column layout on screens between 600px and 768px.
Output: complete HTML page