DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

TimothyAgevi
TimothyAgevi

Posted on

Grouping in CSS

h2 {
    color: red;
}

.thisOtherClass {
    color: red;
}

.yetAnotherClass {
    color: red;
} 
Enter fullscreen mode Exit fullscreen mode
  • In Grouping we separate selectors with commas (,) Alternative of the above 10 lines of code is as shown below:
h2, .thisOtherClass, .yetAnotherClass {
    color: red;
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)

Top Heroku Alternatives (For Free)

>> Check out this classic DEV post <<