1 out of 3 rated this helpful - Rate this topic

Universal (*) selector

Matches any element type.

CSS 2.1, Section 5.3

Syntax

* {...}

Parameters

This (*) selector has no parameters.

Standards information

Remarks

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.

Examples

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


<style>
    * { border: 1px solid orange; }
</style>

 

 

Send comments about this topic to Microsoft

Build date: 11/29/2012

Did you find this helpful?
(1500 characters remaining)

Community Additions

ADD
© 2013 Microsoft. All rights reserved.