Home | JCBid |Software Development | Domain Registration | Hosting | Web Designing | Buy Books | Advertise with JCSearch | Whois | IP Locator |
Add Search | Shopping | Store | Free Blogs | Free GuestBook | Free E-Cards | Free Games | Free Tutorials | Set as Home | Add to Favorite | Suggest a Site | Directory Our Portfolio | Terms of service | Free quote | Tell a Friend | Special Offer | Job Opportunities | games | Usenet Groups

 
JCBid Auction

PROVOCATIVE INTERLUDE by Elizabeth Arden SET-EAU DE PARFUM SPRAY 1.7 OZ & BODY LOTION 3.3 OZ
Seller: csupply

62 Torchier/Onyx/2.25Fttr Meyda Item# 10287
Seller: amazing-products
Jasmine Computers Inc.
JCBid Auction

Steamer & Rice Cooker BIGGEST LOSER AS1500BL Steamer & Rice Cooker
Seller: jkelectronics

BJJ Jaguars Giant 8-Foot X 2-Foot Nylon Banner The Party Animal Item# BJJ
Seller: elect55

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

JasmineCorp Directory
 Check Domain Name:
.  
 

HTML Basic Tutorial

Lesson 5
Background Color
Background Image

Practice HTML (Use it or Notepad)
Color chart: Click here to chose color for your background.


Back ground Color:
Now let's see how to add background color in our html document.

Please note so far we were puting codes inside the <body> </body>tags.
Now for the bg color of the web page and background we will put code within the <body> tag.
Ok our body tag is:
<body>
</body>

Now for background color the attribute is bgcolor it will go inside the body tag.
And color code will be the value for bgcolor attribute. so it will be bgcolor="pink"
Ok let's type our basic html tag and new attributes of <body> tag in Notepad or Practice HTML.

<html>
<head>
<title>

My Web Page
</title>
</head>
<body bgcolor="#FCD2FC">
<font size="3" color="red" face="arial"> It is our text.</font>
</body>
</html>

Now your page will look like this. Here you can see your page color is pink and text is red.


You can use color name or hexadecimal (RGB) value for it. You can add any color to your page.
Use color chart (top of the page) to get different color values.


Background Image:
Ok now let's try background image instead of bgcolor.
Save this background in your hard drive. To save right click (click with right mouse button) on this image and click on save as. Now a pop up box will open up save it in c: drive's Html folder which we created earlier. Give file name as bg.gif or so. Ok so image file's address will be c:/Html/bg.gif

Note: Always save your image file in .gif or .jpg or .jpeg format, otherwise your image will not work in web pages.

If you do not know how to save click here to learn more about it. Method is almost the same.


Now let's see how our html code will look like for our background image.
For background image our code will be <body background=" "> </body>
Please note we've replaced bgcolor by background and instead of color name we'll add our image address or location were the file is.

Note: When you upload your files in server the location of your image files also will change according to your page's http:// address and according to your image files location. It means you've to upload your image file also in server because server will not be able to show your pictures from your local hard drive. We'll learn it later in detail. so instead of your image file location c:/Html/bg.gif it will be something like this..http://yourpage.com/images/bg.gif or .http://yourpage.com/bg.gif

Let's again add our basic html tags.
Now type this html codes and save it in your notepad and look it in your browser.

<html>
<head>
<title>

My Web Page
</title>
</head>
<body background="c:/Html/bg.gif">
<font size="3" color="red" face="arial"> It is our text.</font>
</body>
</html>

When you save in Notepad Ex. you save your file in c: drive, html folder and file name lesson1.htm
Now to open this file in browser type in your browser something like this c:\Html\lesson1.htm

or test it in our Practice HTML.

Your page will look like this in your browser.



Your page will look like this in Practice HTML


The same way you can add any desired image in your background.


 

@Copyright at 2002 by JasmineCorp.net All rights reserved (may not be copied or used in any site in any form)
 





Click here to subscribe for Jasminecorp's product News.

Copyright© 1998 by Jasmine Computers Inc.