CSS *Selectors
Complete CSS Selector Reference Manual
Example
Select all elements and set their background color:
*
{
background-color:yellow;
}
{
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;
}
{
background-color:yellow;
}
Try it Yourself »
Browser Support
![]()
![]()
![]()
![]()
![]()
All major browsers support the * selector.
other extensions