Easy Tutorial
❮ Misc Index Sel Previous Siblings ❯

jQuery :root Selector

jQuery Selectors

Example

Set the background color of the HTML document to yellow:


Definition and Usage

The :root selector selects the document's root element.

In HTML, the root element is always the <html> element.


Syntax


jQuery Selectors

❮ Misc Index Sel Previous Siblings ❯