This property could also be used to replace the current content of the target <body> element on a page as well.
document body Property Syntax:
document.body; document.body = newValue;
document body Property Input Value
The value we set for this property will be used as the replacement of the current content of the <body> element.
document body Property Return Value
The return value of this property is a reference to the <body> element in the page. So that means, using this property, we can access the child, sub-children, and other related elements (like parent elements) of the <body> in an HTML document.
In this example, we’ve used the `body` property to access the <body> element in the page and changed its color to lightblue after 3 seconds delay. Also, after 5 seconds delay, the content of the body is changed to “Hello Wordl :)”.
Note: you can learn more about the setTimeout() function in the related section.