HTML and CSS Reference
In-Depth Information
The background attribute is deprecated in HTML 4 and XHTML because
you can achieve similar effects using stylesheets.
5.3.1.3. The bgproperties attribute
The popular browsers no longer support the bgproperties attribute ex-
tension for the <body> tag. It worked only in conjunction with the back-
ground attribute extension and had a single value, fixed . Its effect was
to freeze the background image to the browser window, so it did not
scroll with the other window contents. Hence, the example H2Omark.gif
background image might serve as a watermark for the document:
<body background="pics/H2Omark.gif" bgproperties="fixed">
5.3.1.4. The text attribute
Once you alter a document's background color or add a background im-
age, you also might need to adjust the text color to ensure that users
can read the text. The HTML 4/XHTML text standard attribute for the
<body> tag does just that: it sets the color of all nonanchor text in the
entire document.
Give the text attribute a color value in the same format as you use to
specify a background color (see bgcolor in the earlier section, 5.3.1.1 )an
RGB triplet or color name, as described in Appendix G . For example, to
produce a document with blue text on a pale yellow background, use:
<body bgcolor="#777700" text="blue">
 
Search WWH ::




Custom Search