CSS Group Selector

In this tutorial you will learn about the CSS Group Selector and its application with practical example.

If we want to apply same styling to multiple selectors then they can be declared together. This is called “grouping”.Just separate the selectors with a comma.

Table Of Contents

Syntax:

Example:

For example, if <h1>, <h2>, and <h3> share they same style, they can be declared together as follows:

You can combine various ID selectors together as shown below:

 

In this tutorial we have learn about the CSS Group Selector and its application with practical example. I hope you will like this tutorial.