Responsive Web Design Principles - Create a Media Query - Free Code Camp

Useful Programmer on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

BeginnerWeb Design4 min

About this video

This short tutorial shows how to create a CSS media query so that a web page's design responds to the size of the device viewing it. It uses a simple example of reducing font size on phones compared with laptops.

What you’ll learn

  • Create a CSS media query that changes styles based on screen width
  • Adjust font size so text suits smaller devices
  • Explain why responsive design adapts layouts to different devices