HTML BACKGROUNDS
HTML BACKGROUNDS
Backgrounds The <body> tag
has two attributes where you can specify backgrounds. The background can be a
color or an image.
Bgcolor
The bgcolor attribute specifies a
background-color for an HTML page. The value of this attribute can be a
hexadecimal number, an RGB value, or a color name:
<body bgcolor="#111111">
<body bgcolor="rgb(1,2,3)">
<body bgcolor="red">
The background attribute specifies a
background-image for an HTML page. The value of this attribute is the URL of
the image you want to use. If the image is smaller than the browser window, the
image will repeat itself until it fills the entire browser window.
<body background=”umyu.png”>
For the background image you have to
specify the folder of the image in your computer or you will save it the same place
with your html file for example:
If you create the folder of your pictures
at the same place of your html file you can only use:
<body background=”pictures/umyu.png”>
and don’t forget to know the file extension of your image. But if you did not
create a folder of the pictures, you merged your html file with your picture at
the same place you can use <body background=”umyu.png”> as I highlighted
it above. You can also use <body background=”c/users/auwal_uli/myfolder/umyu.png”>.
BACKGROUND IMAGE EXAMPLE IN PICTURE
Comments