ExampleSet the background color for the HTML document:
Try it yourself » |
The :root selector matches the document’s root element.
In HTML, the root element is always the html element.
The :root selector is supported in all major browsers, except Internet Explorer.