BODY.text (Property)

The color of body text within the page.

Availability:

DOM level - 1
JavaScript - 1.5
JScript - 3.0
Internet Explorer - 4.0
Netscape - 6.0
Property/method value type:String primitive
JavaScript syntax:-myBODY.text

This value controls the foreground text in the document body. You should use the normal color values to define the required color.

This is the default text color for the document. It corresponds to the TEXT attribute in the <BODY> tag.

Default foreground text is colored according to this setting unless it is in an <A> tag when the alinkColor, linkColor and vlinkColor properties override it. The foreground text color can be changed inline with the <FONT COLOR="..."> HTML tag attribute.

Now that the style control facilities are more sophisticated, this tag attribute is likely to fall into disuse.

Note also that its property name is not consistent with its counterpart, the document.fgColor property whose value it reflects.

See also:BODY.aLink, BODY.link, BODY.vLink, Color names, Color value, Document.alinkColor, Document.bgColor, Document.fgColor, Document.linkColor, Document.vlinkColor, HTML object