Availability: |
| ||||||||
Property/method value type: | Color value | ||||||||
JavaScript syntax: | - | myDocument.fgColor | |||||||
- | myDocument.fgColor = aColorValue | ||||||||
HTML syntax: | <BODY TEXT="aColorValue"> | ||||||||
Argument list: | aColorValue | A hex string or color name |
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 values override it. The foreground text color can be changed in-line 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. On the other hand it does work consistently on both MSIE and Netscape where style sheet controls do not.
DOM level 1 deprecates the use of this property in favor of the BODY.text property.
This property can only be changed in the <HEAD> section. You cannot modify it after the <BODY> has commenced loading.
Prev | Home | Next |
Document.expando | Up | Document.fileCreatedDate |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. |