Question:easy

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

The Correct Option is A

Solution and Explanation

Picture overlapping boxes on a page. Which one sits on top is decided along the depth axis, and $\texttt{z-index}$ is the control for that axis on positioned elements.

Give an element a larger $\texttt{z-index}$ and it layers above elements with smaller values. It has nothing to do with width, height, background color, or zoom, which are governed by other properties.

So $\texttt{z-index}$ manages the front-to-back stacking order.

\[\boxed{\text{The stacking order of elements}}\]
Was this answer helpful?
0