
Using a Background Image on Your Personal Web Page
Background images help create a mood or ambiance for visitors to your site. We've used a background on this page to demonstrate one of the effects you can achieve. It's a good idea to follow a few simple rules and conventions as we've listed below:
-
Keep the image size as small as possible so that your pages loads quickly.
Use only *.gif or *.jpg image files for your backgrounds since other formats may not be recognized.
Don't use more than 256 colors in your image since higher resolutions may not be available to all visitors.
Remember to obtain permission before using any image you have found elsewhere on the web or make certain the author has given permission to use the graphic.
HTML Syntax Needed to Specify Background Images
If the image you'd like to use as your background is in the same directory as the page itself, all you need is a relative link specifying the filename. Just below is the syntax we used to specify the background image displayed on this page.
<BODY BACKGROUND="pwpbg.gif" bgproperties=fixed>
|
-
You can specify a background on another server by using an absolute URL between the quotes, for example:
<BODY BACKGROUND="http://pages.prodigy.com/Art/pwpbg.gif" bgproperties=fixed>
The syntax bgproperties=fixed is optional, but for browsers that support this option, this specifies that the background will not scroll.
The syntax for BODY BACKGROUND replaces the opening <BODY> tag on your page.
Remember to use the closing </BODY> tag at the bottom of your page.
We've Included a Few Sample Backgrounds
The following sample backgrounds are available in your tutorial directory.
 | granite.gif |
 | weave-gr.gif |
 | waves.gif |
 | raindrop.gif |
 | sandston.gif |
Copyright © 1996 Prodigy Services Company. All Rights Reserved.