Hosting Solutions
mobile_logo Table of Contents
seal_frontseal_back

root

The root structural pseudo-class will target the root element of the document(the <html> element).
Syntax Logicelement:root { property_list }

CSS Code Example

<html> <body> <style> *:root { color: blue; } </style> <h2>Heading content</h2> <p>Paragraph content ...</p> </body> </html>

CSS

Selectors

universaltypecompoundclassidnotattributedescendantchildadjacent siblinggeneral siblingfirst childlast childonly childfirst of typelast of typeonly of typenth childnth last childnth of typenth last of typeemptyrootfirst linefirst letterbeforeafterlinkvisitedhoveractivefocustargetenableddisabledcheckedlang