---
title: "Discussion on \"What is Z-Index in CSS and why do we use it?\" | Hashnode"
description: "Discussion on \"What is Z-Index in CSS and why do we use it?\". What is Z-index?\nZ-index is a CSS property that is used to define the order or priority to stack the HTML elements. Elements with higher z-index values will be given more priority and elements with less z-index values(Negative values like -1,-2) will..."
url: "https://hashnode.com/posts/what-is-z-index-in-css-and-why-do-we-use-it/632deb263a049a0d9db742a1"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [What is Z-Index in CSS and why do we use it?](https://swarupap.in/what-is-z-index-in-css-and-why-do-we-use-it?utm_source=hashnode&utm_medium=feed)

What is Z-index? Z-index is a CSS property that is used to define the order or priority to stack the HTML elements. Elements with higher z-index values will be given more priority and elements with less z-index values(Negative values like -1,-2) will...

Sep 23, 2022 · 2 min read · swarupap.in  
Read the article

-   [#css3](https://hashnode.com/tag/css3)
-   [#webdev](https://hashnode.com/tag/webdev)

## Written by

[Swarupa Rani](https://hashnode.com/@Swarupa)

@Swarupa · Hyderabad, India

  
[View profile](https://hashnode.com/@Swarupa)

Senior Software Engineer

Senior Software Engineer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
