Free Web space and hosting from freehomepage.com
Search the Web


HOME
BASIC TUTORIAL
What is Html?
Sample Web Page
Basic Tags
Character Entities
Html Links
Frames
Tables
Lists
Forms
Images
Backgrounds
APPENDIX
Html Tag List

Backgrounds

Two attributes can be added to the <body> tag to create backgrounds for a page. The two attributes are bgcolor and background.
The bgcolor attribute is used to set a background color. The value can be a hexadecimal number, a RGB (RedGreenBlue) value, or a color name. All three of the following attributes create the color black.
<body bgcolor=”#000000”>
<body bgcolor=”rgb (0,0,0)”>
<body bgcolor=”black”>

The background attribute is used to define an image as the background. The value of this attribute is the name of the image to be used. If the image is smaller than the window, the image will repeat itself until it is as big as the window.
<body background=”background.jpg”
<body background=”http://www.yourpage.com/background.jpg”>

NOTE: If you plan to use images for your background, remember these things:

  • How much time will the image take to load?
  • Will the image look good with other images on the page?
  • Will the image look good if it is repeated (to fit the page)?
  • Will the image take the focus off of the text?
Good job! You have completed the basic elements of the tutorial. You are now ready to build a web page.

Much of what I learned to create this tutorial I found on www.w3schools.com.
Back to Top
Lewisville Middle School-2003