---
title: "What is grouping in CSS?"  
description: "What is grouping in CSS?"  
author: "Anonymous User"  
published: 2012-12-21  
updated: 2012-12-22  
canonical: https://www.mindstick.com/forum/510/what-is-grouping-in-css  
category: "css-css3"  
tags: ["css-css3"]  
reading_time: 1 minute  

---

# What is grouping in CSS?

Hi Everyone..\
What is the [concept](https://www.mindstick.com/blog/79/routing-concept-in-dot-net) of grouping in [CSS](https://www.mindstick.com/forum/514/background-gradient-ie7-css-problem)?\

## Replies

### Reply by Vijay Shukla

You can give the same properties to a number of selectors without having to repeat them by separating the selectors by commas.

**Sample code:**\

```
<html><head><style>h1,h2,p{   color:green;}</style></head><body>   <h1>This is heading 1</h1>   <h2>This is heading 2</h2>   <p>This is a paragraph.</p></body></html>
```

\
Below is Output:\
![What is grouping in CSS?](https://www.mindstick.com/mindstickforums/f78107ce-be1d-4686-81bd-d3d03092c7fd/images/30e9664b-30e3-4886-b27e-c9846df764e4.png)


---

Original Source: https://www.mindstick.com/forum/510/what-is-grouping-in-css

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
