← Quiz: CSS Basics: all 10 questions
Quiz: CSS Basics · Question 8 of 10
Why is rem preferred over px for font sizes?
Why is rem preferred over px for font sizes?
- A.rem works only on phones
- B.px is not supported by browsers
- C.rem is relative to the root font size, so text respects the user's font-size setting
- D.rem makes text bold
Answer & explanation
Correct answer: rem is relative to the root font size, so text respects the user's font-size setting
1rem usually equals 16px but scales if the user changes their browser's font size.
Can you get the rest right without peeking?
Take the timed Quiz: CSS Basics quiz free. Pass it to earn XP and count towards your certificate.
Start the quiz →