Skip to content
Learn Netverks

Lesson

Step 18/31 58% through track

responsive-mobile-first

Responsive design (mobile-first)

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
intermediate

This lesson

This lesson teaches Responsive design (mobile-first)—the ideas, syntax, and habits you need before moving on in HTML & CSS.

Traffic is predominantly mobile—layouts that only work on desktop fail users and metrics.

You will apply Responsive design (mobile-first) in contexts like: Landing pages, dashboards, marketing sites, and portfolio pieces built without a framework.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

When the previous lesson's MCQs feel easy and you can explain Responsive design (mobile-first) in your own words.

Responsive web design means one HTML document adapts to phone, tablet, and desktop widths using fluid layouts and media queries.

Mobile-first pattern

  1. Default CSS targets small screens (single column, stacked nav).
  2. @media (min-width: 48rem) adds columns, side-by-side nav, larger type.

Checklist

  • Viewport meta in head (see skeleton lesson).
  • Avoid fixed pixel widths on main text containers.
  • Touch targets ~44px minimum height for buttons on mobile.
  • Test with DevTools device mode and a real phone when possible.

Practice

Resize the preview or narrow the window: sidebar moves below content on small screens, beside content on wide screens.

Important interview questions and answers

  1. Q: What does mobile-first mean?
    A: Base styles target small viewports; min-width media queries add enhancements for larger screens.
  2. Q: `max-width` vs `min-width` queries?
    A: `min-width` adds rules as the viewport grows (mobile-first); `max-width` subtracts as it shrinks (desktop-first).
  3. Q: Why not ship separate m. sites?
    A: One URL reduces maintenance; responsive CSS adapts layout while keeping content unified.

Challenge

Add a tablet breakpoint

  1. Add @media (min-width: 30rem) with a subtle background change on main.

Done when: you can see two visual steps as the preview widens.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • What part of this lesson needs a second read?
  • What would you try differently in a real project?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump