In prior lessons we have talked about using various colors to enhance your page using either the hexadecimal code or the name of a color. This lesson will focus on using color in the background of your page and/or using a graphic as the background of your page. To do this we use two attributes that are part of the <body> tag. Here is an example:
<body bgcolor="red">
This will make the background red, obviously. Look here...
<body background="sunsetbg2c.jpg">
This will put the file sunsetbg2c.jpg in the background. Look here...
<body background="sunsetbg2c.jpg" bgcolor="red" >
This will make the background red and superimpose the file sunsetbg2c.jpg over the top. This is actually the correct way to use graphics in a background. We do this for two reasons. 1) While the graphic is loading the viewer has something colorful to look at and 2) if the graphic doesn't load then there is a default color for the background. This is a more professional way of designing pages than leaving anything to chance. Also, choose your background colors and graphics carefully. Nothing is worse than an ugly page caused by unreadable text or distracting graphics. Look here...
When you think back to prior lessons you might recall that we have learned other tags for the <body> tag. All of them should be used anytime you use the <body> tag. Don't leave anything to chance.
Use one of your prior files and add a background graphic and a background color. Email the file and the graphic to me.
Back to the outline.