O'Reilly logo
  • Richard Smith thinks this is interesting:

Constructing Group Selectors

To work with selectors as a group, simply create a list of selectors separated by commas. So to style all of the heading tags with the same color, you can create the following rule:

h1, h2, h3, h4, h5, h6 { color: #F1CD33; }

This example consists of only tag selectors, but you can use any valid selector (or combination of selector types) in a group selector. For example, here's a selector that applies the same font ...


Cover of CSS: The Missing Manual, 2nd Edition


group selectors