Skip to content

CSS Selectors

Universal (any)

About

The universal selector * matches elements of any type.

Any element

All elements are matched by the selector.

Exclude certain types

The selector can be combined with :not() and the type selector to match any element except those of a certain type. This example matches all elements except h1.

  • Change the selector to exclude h1 and button elements