Body text attribute
Body object
Definition and Usage
The text attribute sets or returns the value of the text attribute of the body element.
The text attribute describes the text color of the document.
Syntax
Set the text attribute:
bodyObject.text="
color
"
Return the text attribute:
bodyObject.text
| Value | Description |
|---|---|
| color | Specifies the text color. See the complete A CSS color value |
Browser support





All major browsers support the text attribute.
Example
Example
Return the value of the text attribute of the body element:
Try it »
Body object