---
title: "Discussion on \"CSS Selectors 101: How CSS Knows What to Style\" | Hashnode"
description: "Discussion on \"CSS Selectors 101: How CSS Knows What to Style\". When I first started writing CSS, I just copied whatever I saw online.\np { color: blue; } — okay, that makes paragraphs blue. Fine.\nBut I did not actually understand why that worked. How does CSS know"
url: "https://hashnode.com/posts/css-selectors-101-how-css-knows-what-to-style/69b41abe6e27dd07d913b760"
---

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

Discussion

# [CSS Selectors 101: How CSS Knows What to Style](https://anukiranghosh.hashnode.dev/css-selectors-101-how-css-knows-what-to-style?utm_source=hashnode&utm_medium=feed)

When I first started writing CSS, I just copied whatever I saw online. p { color: blue; } — okay, that makes paragraphs blue. Fine. But I did not actually understand why that worked. How does CSS know

Mar 13 · 6 min read · anukiranghosh.hashnode.dev  
Read the article

-   [#chaicode](https://hashnode.com/tag/chaicode)
-   [#chaicode-webdev-cohort-2026](https://hashnode.com/tag/chaicode-webdev-cohort-2026)
-   [#css](https://hashnode.com/tag/css)
-   [#css-selectors](https://hashnode.com/tag/css-selectors)

## Written by

[Anukiran Ghosh](https://hashnode.com/@anukiranghosh)

@anukiranghosh · Bengaluru, India

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

Fullstack Web Developer

Fullstack Web Developer

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
