Select all elements, and set their background color to yellow:
More "Try it Yourself" examples below.
The * selector selects all elements.
The * selector can also select all elements inside another element (See "More Examples").
Version: | CSS2 |
---|
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 |
Select all elements inside <div> elements and set their background color to yellow: