# Description

The :root pseudo-class adds a style to an element that is the root of the document.

# Examples

This example shows the `root` selector used to style the first `li` element in a list.

    li:root {
      color:blue
    }

    <ul>
      <li>Matches</li>
      <li>No match</li>
      <li>No match</li>
    </ul>

This gives the following result:

- Matches
- No match
- No match

# Browser Support

Firefox | IE | Chrome | Opera | Safari

# Miscellaneous Information

Defined In: | CSS3