About
The root Node is the root of the document tree.
- in html, this the HTML element
- in xml, this the XML element
- in svg, this the SVG element
- …
In styling / positioning, the root node is the default node for any absolute positioning
Articles Related
Javascript
en-US/docs/Web/API/Document/documentElement
var rootElement = document.documentElement;
var firstTier = rootElement.childNodes;
// firstTier is the NodeList of the direct children of the root element
console.log("The child nodes of the root element are");
for (var i = 0; i < firstTier.length; i++) {
// do something with each direct kid of the root element
// as firstTier[i]
console.log("Node "+i+": Tag Name="+firstTier[i].tagName+", Node Type="+firstTier[i].nodeType);
}
where: