Why you shouldn't set font-sizes using em

Kevin Powell on YouTubeWatch on YouTube

SaveMark complete

Sign in to save videos and track what you’ve finished.

IntermediateUI14 min

About this video

Kevin Powell explains why he recommends rem rather than em for setting font sizes in CSS, and notes that em can work in some situations. It is aimed at people who already write some CSS.

What you’ll learn

  • Explain how em and rem units resolve font sizes in CSS
  • Decide when to set font-size in rem rather than em