HTML DOM Document body
HTML DOM Document body property
The body property is used to either return or set a document body element. If we used it for setting purposes it may overwrite the whole body content. It is similar to a document.documentElement but the main difference is that document.body will return body element and document.documentElement will return html element.
Syntax:-
Its syntax is:- document.body OR document.body = newContent
Return:-
Its return is:- body element of the document
Further Explanation:-
Value | Description |
newContent | The new content for the body element. |