About
The en-US/docs/Web/HTML/Element/body element represents the body of a document (as opposed to the document’s metadata).
DOM Accessor
The document property document.body returns the body element. Can be set, to replace the body element.
The body element of a document is the first child of the html element that is:
- either a body element
- or a frameset element.
If there is no such element, it is null.
Why my body element is empty in the browser ?
In the browser, the HTML of the page is build as a DOM. Unfortunalty, if in the head, there is a empty script tag such as
<script/>
browser such as chrome will not render the body and let it empty.