HTML & CSS · Junior · Question 25 of 75

How are media queries usually written with a mobile-first approach?

Explanation

In mobile-first, the base CSS targets small screens, and @media (min-width: ...) adds styles as the screen grows. Mobile devices get the fewest overrides and styles are easier to build up. Using max-width is desktop-first. Tailwind breakpoints follow the same principle.

Further reading

Problem with a question

HTML & CSS · Junior · question 25

Test yourself

Take the HTML & CSS · Junior quiz: questions and options are shuffled, and you get a review of your mistakes at the end.

Take this quiz