What is the difference between em and rem units in CSS font sizing?

  • Relative to the browser's default font-size
  • Relative to the font-size of the element itself
  • Relative to the font-size of the nearest parent
  • Relative to the root element's font-size
In CSS, 'em' and 'rem' units are used for font sizing, but they differ in their reference point. Understanding their differences is crucial for responsive design and consistent typography.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *