Return the documentElement of the document, as a node name:
The result of x will be:
The documentElement property returns the documentElement of the document, as an Element object.
For HTML documents the returned object is the HTML element.
Note: If the HTML element is missing, the return value is null.
Note: This property is read-only.
Property | |||||
---|---|---|---|---|---|
documentElement | Yes | Yes | Yes | Yes | Yes |
Return Value: | The document's documentElement, as an Element object |
---|---|
DOM Version | Core Level 1 Document Object |
HTML reference: HTML <html> tag
JavaScript reference: HTML DOM HTML Object