CSSGrouping Selectors

Grouping selectors allows you to apply the same style to multiple elements at once. Instead of writing the same rule repeatedly, you can group them by separating each selector with a comma. This makes your CSS cleaner and easier to read. For example, you can center text and give it a color for both headings and paragraphs in one single rule.

h1, h2, p { text-align: center; color: purple; }