1. Which CSS property controls the stacking order of elements?
Correct Answer: z-index
Explanation: z-index controls which element appears on top when elements
overlap.
2. Flexbox is mainly used for one-dimensional layouts.
Correct Answer: True
Explanation: Flexbox works in one direction: row or column.
3. Which unit is relative to the root element’s font size?
Correct Answer: rem
Explanation: rem is based on the root (html) font size.
4. position: absolute removes an element from the normal document flow.
Correct Answer: True
Explanation: Absolutely positioned elements don’t affect other elements’
layout.
5. Which CSS property adds space between flex items?
Correct Answer: gap
Explanation: gap controls spacing between flex or grid items.
6. z-index works only on positioned elements.
Correct Answer: True
Explanation: z-index only works when position is relative, absolute, fixed, or
sticky.
7. Which property aligns items vertically in Flexbox?
Correct Answer: align-items
Explanation: align-items aligns items along the cross axis.
8. opacity: 0 removes the element from the page.
Correct Answer: False
Explanation: The element is invisible but still exists and can be interacted
with.
9. Which CSS feature is used for responsive design?
Correct Answer: Media Queries
Explanation: Media queries adapt layouts for different screen sizes.
10. Which property rounds the corners of an element?
Correct Answer: border-radius
Explanation: border-radius controls how rounded the element corners appear.
11. Which CSS property changes the text color?
Correct Answer: color
Explanation: The color property sets the color of text.
12. display: none will hide the element completely.
Correct Answer: True
Explanation: display: none removes the element from layout and visibility.
13. Which property is used to make text bold?
Correct Answer: font-weight
Explanation: font-weight controls how thick or bold the text is.
14. Which CSS layout system works in two dimensions?
Correct Answer: Grid
Explanation: CSS Grid handles both rows and columns.
15. Which property adds shadow to elements?
Correct Answer: box-shadow
Explanation: box-shadow creates shadow effects around elements.