Little Web Hut
(Cascading Style Sheets) CSS 2.1 Reference

CSS Universal Selector

 

What is a CSS Universal Selector?

  • The universal selector uses an asterisk (*) which matches all elements. In the following example, the color property will be set to red for all elements.
CSS Example:
  * {color: red;}
  <h1>The h1 tag color set to red.</h1>
  <p>The p tag color set to red.</p>
Test It HTML StyleTest It XHTML StyleTest It HTML5 Style