DOM.Document


A Document element is the Element that acts as a containing object for the entire HTML page as an object model. It contains properties and methods that enable the querying and manipulation of the current loaded document.

Document properties

  • document.body: Element (HTML DOM Level 2+)- the <body> element of the current HTML document. This property is mutable, but note that setting it to reference some other element will erase the DOM tree entirely, replacing it with the element provided, and it's subtree.

Document metrics:

  • document.body.clientHeight: (clientHeight attribute inherited from Element.
  • document.height: (obsolete in Gecko 6.0+) height of the body element of the document. Use document.body.clientHeight instead