BackgroundsThe <body> tag has two attributes where you can specify backgrounds. The background can be a color or an image.
BgcolorThe bgcolor means background-color, it can be a hexadecimal number, an RGB value, or a color name:
- Code:
-
<body bgcolor="#000000">
<body bgcolor="rgb(0,0,0)">
<body bgcolor="black">
The lines above all set the background-color to black. (using a mac program fireworks to look and the color code is a easy way to change it from black to other colors)
BackgroundIf you choose to have a picture as a background, but it is smaller than the browser it will repeat itself until the browser is filled.
- Code:
-
<body background="clouds.gif">
<body background="http://www.pro-flash-beat.darkbb.com/clouds.gif">
clowds.gif is just a example
The URL can be relative (as in the first line above) or absolute (as in the second line above).
Basic Notes - Useful TipsThe bgcolor and the text attributes in the <body> tag are deprecated in the latest versions of HTML.