
|
The most obvious way to add color to your pages is to include colorful images, using the IMG tag: <IMG SRC="myphoto.gif" ALT="A photo of me"> But you can also change the colors of the HTML part of the page. Attributes affecting whole page go on the BODY tag: <BODY BGCOLOR="#ffffcc"> Colors in HTML are specified as a color name, or as #RRGGBB, a hexadecimal red-green-blue triplet: |
|
attribute |
meaning |
Netscape default |
|---|---|---|
|
BGCOLOR |
page background |
grey (#CCCCCC) |
|
TEXT |
normal text |
black (#000000) |
|
LINK |
link text |
blue (#0000FF) |
|
VLINK |
visited links |
purple (#660099) |
|
ALINK |
active link |
red (#FF0000) |
|
BACKGROUND |
URL of image for bkg |
|
Warning: you can create a totally unreadable document by choosing too bold a background (example) .
Warning: be sure your document is in the right general form:
<HTML> <HEAD>
<TITLE>Your title</TITLE>
</HEAD>
<BODY (and BACKGROUND= BGCOLOR= etc.) >
The document body goes here...
</BODY> </HTML>
Starting in MS IE 2.0 and Netscape 3.0:
<TABLE BGCOLOR=color>
<TD BGCOLOR=color>
Bug alert: Colored cells mustn't be empty in Netscape.