CSS universal selector
The universal selector is marked with an asterisk (*
) and serves as the basis for other selectors. It selects all elements regardless of their type. For example, creating a rule for the selector that adds a red background to an element will add red background to every single element of the page:
* {
background-color: red;
}
The universal selector is often used in combinations with other selectors, allowing us to select all elements inside another element.