HTML 4 and XHTML standards provide a number of attributes for the
that let you define text, link, and document background colors, in
addition to defining an image to be used as the document background.
Internet Explorer extends these attributes to include document
margins and better background image control. And, of course, the
latest style-sheet technologies integrated into the current browsers
let you manipulate all of these various display parameters.
The attributes that control the document background, text color, and
document margins are used with the
standard, although deprecated, way you can change
the default background color in the browser window to another hue is
bgcolor attribute for the
<body> tag. Like the
color attribute for the
<font> tag, the required value of the
bgcolor attribute may be expressed in either of
two ways: as the red, green, and blue (RGB) components of the desired
color, or as a standard color name. Appendix G
provides a complete discussion of RGB color encoding along with a
table of acceptable color names you can use with the
Setting the background color is easy. To get a pure red background using RGB encoding, try:
For a more subtle background, try:
If a splash of color isn’t enough, you may also place an ...