This page is In Progress

Notice: The WebPlatform project has been discontinued when the Stewards partnership agreement ended in September 2015. This site has been frozen, and the assets we have created will remain.

Universal

Examples

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

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

Notes

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.

Syntax

* {...}

Parameters

This (*) selector has no parameters.

Standards information

See also

Related articles

Selectors

Attributions