---
title: "Discussion on \"CSS Selectors\" | Hashnode"
description: "Discussion on \"CSS Selectors\". CSS selectors define the elements to which a set of CSS rules apply.\nID selector\nSelects an element based on the value of its id attribute. There should be only one element with a given ID in a document.\n#id-selector {\n  /*   */\n}\nClass selector\nSele..."
url: "https://hashnode.com/posts/css-selectors/62daf06b99a21b6b5b5eb6e3"
---

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

Discussion

# [CSS Selectors](https://nishok19.hashnode.dev/css-selectors?utm_source=hashnode&utm_medium=feed)

CSS selectors define the elements to which a set of CSS rules apply. ID selector Selects an element based on the value of its id attribute. There should be only one element with a given ID in a document. #id-selector { /\* \*/ } Class selector Sele...

Jul 22, 2022 · 1 min read · nishok19.hashnode.dev  
Read the article

-   [#css](https://hashnode.com/tag/css)
-   [#html5](https://hashnode.com/tag/html5)

## Written by

[Nishok Maharaaj R](https://hashnode.com/@nishok19)

@nishok19

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
