Question · JavaScript and React course · Module 7: Styling and Animations

Basics: CSS Unit for Responsiveness

Which CSS unit is best for creating responsive font sizes?

Answer options

  • rem - relative to the root element (html) font size
  • px - pixels, a fixed unit independent of context
  • cm - centimeters, ideal for print and screens
  • pt - typographic points, standard in CSS

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