{"name":"root","type":"selector","title":":root Selector","deprecated":null,"removed":null,"desc":"Selects the element that is the root of the document.","categories":["selectors/basic-filter-selectors","version/1.9"],"entries":[{"return":"","signatures":{"added":"1.9"},"examples":{"desc":"Display the tag name of the root element.","code":"\n$( \"\" ).html( $( \":root\" )[ 0 ].nodeName ).appendTo( \"#log\" );\n","css":"\n span.fot {\n color: red;\n font-size: 120%;\n font-style: italic;\n }\n","html":"\n
In HTML, the root of the document, and thus the element that $(\":root\") selects, is always the <html> element.