![]() |
VOOZH | about |
The HTML DOM Body property is used to set the document <body> element. It only returns the content present in the <body> Tag. This property is used to change the present content inside the <body> element and sets them with the new specified content. This property does not return the <HTML> element.
Syntax:
document.bodydocument.body = ContentReturn Value: A reference to the Body Object, which represents a <body> element
Property Value: The document.body property uses single value Content which is used to add new content in the body element.
Example 1: In this example, we will use document.body property
Output:
👁 ImageExample 2: In this example, we will use document.body property
Output:
Supported Browsers: The browser supported by DOM body property are listed below: