| [Index of Lessons] [Lesson 12] [Advanced Lesson 2] [Colour Page] |
A1. Colourful and Textured Backgrounds |
|
Backgrounds The background of your page should be just that - in the background. As different colours or even patterns are added, keep in mind that the colours chosen should not interfere with the readability of text. For the pages of this site, I have used a solid white color as the background colour and a jpg file to make the textured border and white background, this choice makes for a clean and non-interfering backdrop. Which should make it all easier to read and work from.
As you may recall from a very early lesson background colour is determined
in the <body...> tag. Also determined within
the body tag is the text, link and vlink colours.
By adding values to each of these tags, you can chose a colour combination
that suites the type of web page you are creating. |
| Backgrounds by Body Tags | ||
| HTML | Result | |
<body bgcolor="white" text="black" link="red" vlink="darkred"> |
I know this isn't really the example that I normally show, but the html shown to the left is the html in all of these pages except for one more addition, and that is : | |
<body bgcolor="white" background="paper6.jpg" text="black" link="red" vlink="darkred"> |
As you can see the addition was the command background="filename.jpg". The background picture can be of type JPG or Gif. | |
|
Solid colors add some variety to web pages- but you can go even
farther by adding a textured background. By using a small image file
(GIF or JPEG) and the browser will "tile" the web page with repeated
copies of the image. Some of the things you should keep in mind are:
|
|
Example It is now time to incorporate the example again. For the background of the web page an image will be loaded for the main page, the text shall become white and the back ground colour shall become black. It is important to remember that when incorporating an image into a web page, not to have background image disrupt the readability of your work. So let's modify.
<html> Like before, add all of this to your first web page by opening the document and editing the page. To speed it up, you can cut and paste the code. After you have done all of this, click here (Example 8) to compare your work to the example provided. You should note that it is not always important to incorporate a background image, it is purely a matter of style. If you wish to try differet solid colour backgrounds without images, then go for it. Experimentation is how you achieve a look that works for you.
|
| Click on Advanced Lesson 2 to continue, or click here (Top) to return to the top of document. |