English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
documentElementThe read-only property returns the element as the root element of the document, as an element object.
For HTML documents, the returned object is the <html> element.
Please refer todocument.bodyProperty, which returns the element.
document.documentElement
var root = document.documentElement;Test See‹/›
All browsers fully support the documentElement property:
Property | |||||
documentElement | Yes | Yes | Yes | Yes | Yes |
Return Value: | The element is the root element of the document |
---|---|
DOM Version: | DOM Level1 |