You are here: Reference > HTML > attributes > text (body)

text attribute (body)

Browser support:
Specifies the color of the text in the document body.
This attribute is deprecated. Use the color style property of the body element instead.
JavaScript page for this attribute: text. You can find other example(s) there.

Possible values:

A legal color value. It can be a hexadecimal, RGB or predefined color value. For more information, see the page for colors.
Default: this attribute has no default value.

Example HTML code 1:

This example illustrates the use of the text attribute:
<body text="red">
    The color of the text is red.
</body>
Did you find this example helpful? yes no

Example HTML code 2:

Recommendation:
<body style="color:#FF0000;">
    The color of the text is red.
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content