Complete CSS Selector Reference
Set the background color for the HTML document:
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 IE8 and earlier.
Complete CSS Selector Reference
Your message has been sent to W3Schools.