CSS Selector List Combinators (,)

Definition and Usage

CSS Selector List Combinators (,) is used to select all matching elements. Element names are separated by commas.

Example

Select and set the styles for all <h1>, <h2>, and <p> elements:

h1, h2, p {
  background-color: gold;
  border: 1px solid gray;
{}

Try It Yourself

CSS Syntax

element1, element2, ... {
  css declarations;
{}

Technical Details

Version: CSS1

Browser Support

Chrome Edge Firefox Safari Opera
Support Support Support Support Support

Related Pages

CSS Tutorial:CSS Grouping