Question:

What does the z-index property in CSS control?

Show Hint

Think about which overlapping element appears on top.
Updated On: Jul 2, 2026
  • The stacking order of elements
  • The size of an element
  • The background color of an element
  • The zoom level of an element
Show Solution
collegedunia
Verified By Collegedunia

The Correct Option is A

Solution and Explanation

Step 1: The z-index property applies to positioned elements and sets their order along the z-axis, which points out of the screen.

Step 2: A higher z-index places an element in front of one with a lower value when they overlap.

Step 3: Size is set by width and height, color by background properties, and zoom by transform or the zoom property, not by z-index.

Step 4: So z-index controls the stacking order of elements.
Was this answer helpful?
0
0