© ilj ilj@flowsim.se
HTML for beginners
BACKGROUND COLOURS - BACKGROUND PICTURES

 
text: bakgrunder
 

 

 

 
You can use either a colour or a picture as background (or use a combination, see below). The following code will result in a uniform red background:
 
<BODY BGCOLOR="red">
 
This may also be written like
 
<BODY BGCOLOR="#FF0000">
 
More on colours, see
browser-safe palette
and
colour values - names
and
colour values - numbers.

 

 
If you want to use a picture as a background this is the HTML to use:
 
<BODY BACKGROUND="picture.jpg">
 
In this example the image file "picture.jpg" is in the same directory/ folder as the HTML file. The file format does not have to be JPG but may also be eg GIF.

 

 
This is what the background picture of this page looks like:


 
The pictures will thus be put side by side to fill up the whole window.
 

 
You can also set the background colour and use a background picture at the same time. If the background picture is saved with one colour made transparent the background colour will show through.
<BODY BGCOLOR="red"
        BACKGROUND="
picture.gif">
 

 
Below the background picture is placed in table cells with different background colours.

 

 
You can also set the background colour and choose a picture by using a stylesheet. This works with newer browsers (i e N 4.0+ and MIE 4.0+).
 

 

This page was designed by
 
ilj SHAREWARE

 
ilj@flowsim.se
 

 
Works best with Netscape 3.0+.
Last modified: December 28, 1998

This page should be part of a frames system
at:
http://www.flowsim.se