Site hosted by Angelfire.com: Build your free website today!

5.3Document Colors and Background Images

The HTML 4 and XHTML standards provide a number of attributes for the tag that let you define text, link, and document background colors, in addition to defining an image to be used as the document background.

5.3.1Additions and Extensions to the <body> Tag:

The attributes that control the document background, text color, and document margins are used with the <body> tag.

5.3.1.1 The bgcolor attribute

One standard, although deprecated, way you can change the default background color in the browser window to another hue is with the bgcolor attribute for the <body> tag.

5.3.1.2 The background attribute

If a splash of color isn't enough, you may also place an image into the background of a document with the background attribute in the <body> tag.

5.3.1.3 The bgproperties attribute

The bgproperties attribute has a single value, fixed. It freezes the background image to the browser window, so it does not scroll with the other window contents.