CSS *Selectors

Complete CSS Selector Reference Manual

Example

Select all elements and set their background color:

*
{
background-color:yellow;
}

Try it Yourself »

Definition and Usage

The * selector selects all elements.

The * selector can also select all elements within another element:

Example

Select all elements within the <div> element:

div *
{
background-color:yellow;
}

Try it Yourself »


Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

All major browsers support the * selector.


Complete CSS Selector Reference Manual

other extensions