HTML & CSS · Middle · Question 11 of 75
What does font-size: clamp(1rem, 2.5vw, 2rem) resolve to on a 1000px-wide screen (1rem = 16px)?
- 116px - the minimum is always used
- ✓Correct answer: 25px
- 332px - the maximum is always used
Explanation
clamp(MIN, VAL, MAX) returns VAL bounded below by MIN and above by MAX. 2.5vw at 1000px = 25px, which is between 16px and 32px, so the result is 25px. At 400px it would be 10px → clamped to 16px; at 2000px → 50px → clamped to 32px. This gives fluid typography without media queries.