SEARCH OUR SITE
HOME TUTORIALS RESOURCES SEARCH ABOUT US CONTACT US HELP
 Guide to Learning HTML - Tutorial - Background
Background
The background of your page is very important. It sets the tone for your site, and you know what they say about first impressions.

Adding a background color
To change the color of the background, you include a BGCOLOR attribute to the BODY tag, specifying the color in hexadecimal code.
Here is an example:
<body bgcolor="#ffffff">
The hexadecimal code "#ffffff" used in HTML to indicate colours.
This will give you a WHITE background.

Here are some examples of colour:
Name Hexadecimal Code Colour
Black #000000
White #FFFFFF
Green #008000
Maroon #800000
Olive #808000
Navy #000080
Purple #800080
Gray #808080
Yellow #FFFF00
Lime #00FF00
Aqua #00FFFF
Fuchsia #FF00FF
Silver #C0C0C0
Red #FF0000
Blue #0000FF
Teal #008080

Adding a background image
The code for adding a background image file is:
<body background="filename.jpg">

The background image will scroll when the user scrolls down the page. You can set the background to be fixed by adding bgproperties="fixed".
It looks like this:
<body background="background1.jpg" bgproperties="fixed">


Choose a topic
 Basic HTML
  - Basic
  - Background
  - Links
  - Images
 Intermediate HTML
  - Font Size
  - Text
  - Lists
  - Background Music
 Advanced HTML
  - Tables
  - Frames
  - Meta Tag
 Quick Reference
  - HTML Tags
  - Special Characters
 Location: /28461/background.htm
PREVIOUS PAGE NEXT PAGE

| Home | Tutorials | Resources | Search | About Us | Contact Us | Help |


This web site is best viewed with 800 x 600 High Color,
Internet Explorer 4.0 or Netscape 4.0 or later versions.
This entire site, except for licensed resources,
Copyright © 1999 by Team28461 All rights reserved.