In the context of CSS accessibility, what is the significance of using relative units like 'em' or 'rem' instead of absolute units like 'px'?
- font-size: 1.2em;
- margin: 16px;
- padding: 20px;
- width: 300px;
Relative units, such as 'em' or 'rem', are crucial in CSS accessibility as they scale with the user's preferred font size. This ensures that the layout adapts to the user's settings, providing a more inclusive and user-friendly experience, unlike absolute units that may hinder accessibility.
Loading...
Related Quiz
- You are tasked with creating a list where every even item has a gray background. Which CSS selector would help you accomplish this?
- SVG images can be manipulated using CSS if they are included in the HTML as a/an ________ tag.
- Tailwind CSS is often referred to as a ________ framework due to its approach to CSS classes.
- When applying margin: auto to an element, under which conditions will it center the element horizontally?
- What is the default value of the flex-direction property in a Flexbox container?