Question · HTML and CSS course · Module 7: SASS

Review: min-width vs max-width

What is the difference between @media (min-width: 768px) and @media (max-width: 768px) in the context of the mobile-first approach?

Answer options

  • There is no difference, both work the same way
  • min-width sets the minimum element width, max-width sets the maximum
  • min-width applies styles from a given width upward (mobile-first), max-width applies styles from a given width downward (desktop-first)
  • min-width works only on phones, max-width only on desktops

You can check the correct answer by solving this task in the CodeWorlds game.