DOM - Body

About

The body node in the DOM tree represents the HTML body element.

Management

Access

You access the body node via the document node as property.

Example:

let body = document.body;
let bodyWidth = window.getComputedStyle(body).getPropertyValue("width");
console.log("The width of the body is "+bodyWidth);

Documentation / Reference





Discover More
CSS - Absolute Positioning (Relative / Absolute / Fixed > Absolute or Static > Absolute )

absolute positioning is a positioning model that occurs when a box has the absolute value as position property. When this is the case, the absolute box is positioned: * from the first ascending box...
HTML - Body element

The body element represents the body of a document (as opposed to the document’s metadata). The document property document.body returns the body element. Can be set, to replace the body element....
Insert Adajcent Illustration
What is InsertAdjacent and InsertAdjacentHTML and how to use them ?

InsertAdjacent is a function that permits to insert a node or a html into the DOM tree relatively to a node at this positions (as a child or sibling)



Share this page:
Follow us:
Task Runner