CSS/Selectors/universal selector

From Web Education Community Group
< CSS‎ | Selectors
Jump to: navigation, search

Universal selector

A Universal selector represents the all elements.

Syntax

*{ properties }

Example

[style.css]

 *{
   color: #f00;
   font-size: 1.2em;
 }

[index.html]

<body>
  <h1>Universal selector example.</h1>
  <p>This is a paragraph.</p>
</body>

Css3 selectors univ.png


CSS defines the Universal selector in 6.2. Universal selector.