Course contentsShow
← Web Development
Lesson 404 of 2,9827. Responsive DesignFree lesson

Testing Media Queries Across Devices

Use browser DevTools, device emulation, and real devices to verify responsive behavior at all breakpoints.

Testing Media Queries Across Devices

What you'll learn: How to verify that your responsive styles actually work on different screen sizes without owning every device imaginable.

You've written beautiful media queries with perfect breakpoints, but here's the reality check: you need to test them. Writing @media (min-width: 768px) means nothing if you haven't actually seen what happens at 768 pixels wide—and at 767, and at 1024, and everywhere in between.

Think of it like testing a recipe: reading it isn't cooking it. You need to taste at every stage.

Browser DevTools Device Emulation

Your browser's DevTools include a device emulation mode (often called "responsive design mode" or "device toolbar"). This lets you:

  • Drag the viewport to any width and height
  • Select preset device dimensions (iPhone, iPad, etc.)
  • Rotate between portrait and landscape orientation
  • See exactly which breakpoints trigger as you resize

How to access it: In Chrome or Firefox, press F12 to open DevTools, then click the device icon or press Ctrl+Shift+M (Windows) or Cmd+Shift+M (Mac).

The Importance of Real Devices

DevTools emulation is fantastic for rapid testing, but it's not perfect. Real devices have different:

  • Touch behavior
  • Screen pixel densities
  • Browser quirks
  • Performance characteristics

If possible, test on at least one real phone and one real tablet. Borrow from friends, visit a store, or use cloud-based device labs.

Systematic Testing Workflow

  1. DevTools first: Resize through all your breakpoints slowly, watching for layout breaks
  2. Preset devices: Test common devices (iPhone SE, iPad, large desktop)
  3. Real devices: Verify on actual hardware when available

Key Takeaway: Testing responsive design requires browser DevTools for quick iteration, device presets for common scenarios, and real devices for final verification—together they ensure your media queries work everywhere.