QuizNot attempted
rem vs em
1–4 to choose, Enter to submit
Show answer & explanation
Correct answer:
- 54px vs 24px
emonfont-sizeis relative to the parent's font-size and compounds:.parent= 24 × 1.5 = 36,.child= 36 × 1.5 = 54.remalways uses the root: 16 × 1.5 = 24.- Not 36px vs 24px: 36 is
.parent, it forgets the second multiplication. - Not 24px vs 24px: that treats
emlikerem. - Not 54px vs 36px:
remignores the parent chain entirely, so it cannot be 36. - Use rem for a consistent type scale, em for things that should scale with their component.