Question · JavaScript and React course · Module 14: Advanced Styling

The clamp() Function in CSS

What does the CSS function clamp(16px, 3vw, 32px) do in the context of font-size?

Answer options

  • Sets the font size to exactly 3vw
  • Sets a fluid font size: minimum 16px, optimal 3vw, maximum 32px
  • Randomly picks one of the three values
  • Sets the font size to the average of the three values

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