Which unit of measurement in CSS is relative to the font-size of the parent element?
- %
- em
- px
- rem
In CSS, the 'em' unit is relative to the font-size of the parent element, providing a scalable and flexible way to define sizes. 'px' is fixed, 'rem' is relative to the root element, and '%' is a percentage of the parent element's font-size.
Loading...
Related Quiz
- During a website redesign, a developer needs to update the form buttons to change color when they are interacted with by the user. Which pseudo-class is most appropriate for changing the button color when the button is clicked?
- In the BEM methodology, how is a modifier typically represented in a class name?
- A developer is using Styled Components in a React project and needs to style a button differently based on its active state. Which feature of Styled Components should they use to achieve this?
- The CSS function clamp() restricts a value between a specified ______ and ______.
- To override a CSS Variable in a specific context, you must define it within a ________ selector to increase its specificity.