Which CSS unit is relative to the root element's font size?

  • em
  • px
  • rem
  • vw
The rem unit in CSS is relative to the root element's font size, which makes it a practical choice for creating responsive layouts. Unlike em, which is relative to the font size of its nearest parent, rem is always relative to the font size of the root (html) element.
Add your answer
Loading...

Leave a comment

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