Rated A+
What does a CSS preprocessor do?
✔✔A CSS preprocessor extends CSS with variables, nested rules, and functions, allowing for
more organized and maintainable stylesheets.
How can you make an element responsive to different screen sizes?
✔✔You can make an element responsive by using relative units like percentages, `vw`, or `vh`,
and by employing media queries.
What is a CSS framework?
✔✔A CSS framework is a pre-prepared library that provides a structure for styling websites,
including grid systems and UI components.
How can you hide an element visually while keeping it accessible for screen readers?
✔✔You can hide an element visually by using `visibility: hidden;`, which keeps it in the
document flow but not visible.
1
, What is the difference between the `absolute` and `relative` positioning in CSS?
✔✔`Absolute` positioning removes an element from the document flow and positions it relative
to its closest positioned ancestor, while `relative` positioning keeps it in the flow but offsets it
from its original position.
What role does the `@media` rule play in CSS?
✔✔The `@media` rule is used to apply styles conditionally based on the characteristics of the
device, such as width, height, and resolution.
How can you add spacing between elements without using margins?
✔✔You can add spacing between elements by using padding within the elements themselves or
by applying a `gap` property in flex or grid layouts.
What does the `calc()` function do in CSS?
✔✔The `calc()` function allows you to perform calculations to set CSS property values
dynamically, combining different units.
What is a CSS sprite and its benefit?
2