Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

Universal (*) selector

Matches any element type.

CSS 2.1, Section 5.3



* {...}


This (*) selector has no parameters.

Standards information


The universal selector matches every element in the document tree. If the universal selector is not the only component of a simple selector, the "*" may be omitted. For example:

  • *.myclass and .myclass are equivalent.
  • *#myid and #myid are equivalent.
  • *:hover and :hover are equivalent.


The following style rule draws a thin orange border around every element on the page.

    * { border: 1px solid orange; }



© 2015 Microsoft