Example
Select all elements, and set their background color to yellow:
*
{
background-color: yellow;
}
Try it Yourself »
More "Try it Yourself" examples below.
Definition and Usage
The * selector selects all elements.
The * selector can also select all elements inside another element (See "More Examples").
Version: | CSS2 |
---|
Browser Support
The numbers in the table specifies the first browser version that fully supports the selector.
Selector | |||||
---|---|---|---|---|---|
* | 4.0 | 7.0 | 2.0 | 3.1 | 9.6 |
CSS Syntax
More Examples
Example
Select all elements inside <div> elements and set their background color to yellow:
div *
{
background-color: yellow;
}
Try it Yourself »