You are designing a website for accessibility and need to ensure that text can be resized without breaking the layout. Which CSS units should you consider using for font sizes to achieve this?
- em
- px
- rem
- vw
To achieve text resizing without affecting layout, using relative units like rem (root em) is ideal. Unlike em, which is relative to the parent, rem is always relative to the root element. This ensures consistent scaling throughout the page, promoting accessibility.
Loading...
Related Quiz
- When incorporating a complex SVG graphic into a website, how can a developer ensure that the SVG can be styled with CSS while keeping the file structure manageable?
- Describe how CSS custom properties (CSS Variables) can be used to streamline the management of color schemes in a stylesheet.
- How would you make an animation run indefinitely in CSS?
- The CSS function rgba() stands for red, green, blue, and ________, which controls transparency.
- What role does CSS play in ensuring that websites are usable by people with color vision deficiencies?