August 1999
Intermediate to advanced
1488 pages
72h 53m
English
document.classes.className.tagName.color
The color property specifies foreground color of an element as associated with the class called className. The definition can also specify a tag or the word all for tagName.
Listing 7.71 uses the color property to set the color of various text.
<html> <script> <!-- Hide //Create a style sheet classes that defines colors document.classes.BLUE.all.color = "blue"; document.classes.RED.all.color = "red"; //Hide End ---> </script> <p class=BLUE>The blue boat floated on the blue ocean.</p> <p class=RED>The red car stopped at a red stop sign.</p> </html> |
Read now
Unlock full access