HTML DOM body Property (original) (raw)
Last Updated : 11 Jul, 2025
The **HTML DOM Body property is used to set the document element. It only returns the content present in the Tag. This property is used to change the present content inside the element and sets them with the new specified content. This property does not return the element.
**Syntax:
- This syntax returns the body property.
document.body
- This syntax is used to set the body property.
document.body = Content
**Return Value: A reference to the Body Object, which represents a 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
HTML `
DOM body propertyGeeksforGeeks
DOM body property
Submit`
**Output:

**Example 2: In this example, we will use **document.body property
HTML `
DOM body propertyGeeksforGeeks
DOM body property
Submit`
**Output:

HTML DOM body Property
**Supported Browsers: The browser supported by _DOM body property are listed below: