Name

fgColor — NN 2 IE 3 DOM n/a

Synopsis

Read/Write

The foreground (text) color for the document. While you can change this property in Navigator, the text does not change dynamically in response (at least through Version 4).

Example

document.fgColor = "darkred"

Value

A hexadecimal triplet or plain-language color name. See Appendix A for acceptable plain-language color names.

Default

Browser default (usually black).

Get Dynamic HTML: The Definitive Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.