Background colors and images
Background color
- You can control the background color of your Web page, although some
browsers support a user-defined color which will override the color
specified in a page.
To specify a color, you must know its hexadecimal value. If you
can find the color's RGB (red, green, blue) number, you can convert
it to hexadecimal using a Web-based converter at:
http://www.telacommunications.com/nutshell/rgbform.htm
-
Yahoo has a page of links to helpful color information:
http://dir.yahoo.com/Arts/Design_Arts/Graphic_Design/Web_Page_Design_and_Layout/Color_Information/
-
- In this example, the color 00FFFF (no red, maximum green and blue)
is light blue. You must specify the color value in the body tag like
this:
<body bgcolor="#OOFFFF">
See this page with the OOFFFF color in the
background.
Background images
- You can also put a background image on your page by specifying the
image name in the <body> tag. The image will be tiled to fit the
page. You can get some ideas for backgrounds by looking at other pages
on the Web or by looking at collections of images such as Netscape's
Background Sampler. Background images can be in GIF or JPEG format.
The tag for specifying a background uses the background=
attribute with the path or URL to the image. If you create your own
image and have it in the directory with the html file, you can just
specify the image name.
<body background="metal.gif">
or
<body background=
"http://www.ncsu.edu/cc/edu/html_trng/advclass/metal.gif">
See this page with the metal background image
If you specify a background color as well as an image, the image
will usually take precedence, but your page may flash the background
color briefly when it first loads.
Last modified
July 20, 2004
by cawalker
|