Universal selector

Matches any element type.


* {sRules}

Possible values


String that specifies one or more cascading style sheet property/value pairs.


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:

  • *.myclassand .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;}

Standards information

This selector is defined in Cascading Style Sheets (CSS), Level 2 (CSS2) Ee341473.xtlink_newWindow(en-us,Expression.40).png.

See also


Understanding selectors
Class selector
Equality attribute selector
Existence attribute selector
Hyphen attribute selector
ID selector
Prefix attribute selector
Substring attribute selector
Suffix attribute selector
Type selector
Whitespace attribute selector

Send feedback about this topic to Microsoft. © 2011 Microsoft Corporation. All rights reserved.