I have just recently started using NetBeans IDE (6.9.1) and have used it to add a stylesheet to my site-in-progress.
To my surprise, one element was automatically added:
root {
display: block;
}
Looking around, I could find some information about the :root pseudo-class but nothing about the root element itself.
What is the root element and does it have any use?
There is no element called root in HTML. The html element itself is “the root element” (which is the term given to the element which is the ancestor of all the other elements in the document), but this would be matched by
html { }.However, see the
:rootpseudo-class (with a colon).