It wouldn’t make much sense to change the background color of a page if you couldn’t change the text colors as well. Just as you can use the bgcolor attribute of the <body> tag to change a page’s background color, there are attributes that enable you to modify text colors on a page.
Text colors are specified with the same identifiers as background colors. The following attributes can be added to the <body> tag of a page to alter the color of the pae text and link colors:
Text
Controls the color of all the opal’s body text except for link text, including headings, body text, text inside tables, and so on.
Link
Controls the color of link text for links that the user has not already clicked on.
V link
Controls the color of links that the user has already visited
A link
Controls the color of a link while the user is clicking on it. When th user clicks on a link, it changes to the color, when he or she releases the mouse button, it switches back.
Remember the haunted house image that you inserted on a page earlier? The page would be decidedly spookier with a black background, and orange text would be so much more appropriate for the holiday. To create a page with a black background, orange text, and deep red unvisited links, you might use the following <body> tag:
<body bgcolor =”#000000” text =”#ff9933” link =”#800000”>
Both these links would produce a page that looks something like the one shown in figure 7.30.
No comments:
Post a Comment