Introduction
Text
Formatting
Links
Lists
Images
Image Formats
Image Tag
Background Images
Image Maps
Example
Tables
Frames
Forms
Conclusion


Backgound Image
We are going to go back to the body tag in order to place an image on the background of your entire webpage. So here is the syntax for loading a background image:

<BODY TEXT="#FFFFFF" BGCOLOR="#000000" BACKGROUND="image.gif">

You can place a complete or relative URL in the background attribute. It is also a good idea to specify a background color that is close to your background image. Since, your background image may take a while to load or if it might not load, and your text and images already on the page might need the contrast from the background image to properly show though. For instance if your background image has a lot of black in it and your text is white, if the background image doesn't load it will make really difficult for someone to read.

Tiling a background image
When creating a background image you need to consider the screen resolution in which it will be viewed, not all users use the same screen resolution. So if you don't want you image to tile then you need to create a really large image file. But a lot of images are created with the intention of tiling the image across the screen. The browser starts with the image in the left-hand corner of the screen, as soon as your image size is smaller than the screen the browser will automatically fill in the rest of the screen with the same image, until it fills up the screen entirely. This effect is used to create stripes or repetitive images across the screen, while using a small file size.

back  next

© Copyright 2000-2002 by Pepmint.com. All Rights Reserved

Search Pepmint.com

home :: tutorial :: portfolio :: links :: hammies :: guestbook :: contact