JavaScript Reference/Javascript Properties/documentElement
"documentElement" Example
<html>
<body>
<button onClick="alert(document.documentElement.nodeName);">Root Node</button>
</body>
</html>
"documentElement" is applied to
+----------------+--------------------------------------------------------------+
| Applied_To |document |
+----------------+--------------------------------------------------------------+
"documentElement" Syntax and Note
Note:
Read-only property.
Returns the HTML element that contains all the content.
Syntax:
document.documentElement