<BODY>
tag that appears near the top
of your Web page. Let's look at colors first. You can add a solid
color background by adding the attribute BGCOLOR="[color]"
to
the <BODY>
tag, like this:
<BODY BGCOLOR="YELLOW">
NOTE: Most browsers give users the option of setting their own colors, and of also specifying that those colors can not be overridden by the settings in a Web page. Never assume that the user will actually see the same background color that you specify; at best you can only hope that your page will display as you intended. |
AQUA | BLACK | BLUE | FUCHSIA | GRAY | GREEN | LIME | MAROON |
NAVY | OLIVE | PURPLE | RED | SILVER | TEAL | WHITE | YELLOW |
<BODY BGCOLOR="#D9C714">
<BODY>
tag. They are (with some
sample colors):
LINK="YELLOW"
(the color of unvisited links)VLINK="AQUA"
(the color of visited links)TEXT="WHITE"
(the color of all other text)
<BODY>
tag that looked like this (Example 3):
<BODY BGCOLOR="NAVY" LINK="YELLOW" VLINK="AQUA" TEXT="WHITE">
BACKGROUND
instead of BGCOLOR
,
and give the filename of the graphic to be used as a background
like this (Example 4):
<BODY BACKGROUND="gcanyon.gif">
NOTE: On the Web, filenames are case sensitive. This means that if you've used capital letters in a link and not in the filename itself, or vice versa, your link may work while you're testing it on your PC and yet fail when posted to a Web server. To be on the safe side, it's recommended that you avoid capital letters entirely when naming and linking to files. For similar reasons, though somewhat more complicated ones, you should also avoid using spaces in filenames. |
Terms to know from this lesson |
Hexadecimal color code: A numeric color code consisting of a pound sign (#) and six digits (0-9 and/or A-F), specifying the proportions of red, green and blue in the following order: #RRGGBB. |
Web-safe color: A color selected from a limited palette of colors chosen to reproduce correctly on most browsers. A "Web-safe color" will have a hexadecimal code made up only of the digits 00, 33, 66, 99, CC and/or FF. |
LINK attribute: Used in the <BODY>
tag to specify the color of unvisited links. |
VLINK attribute: Used in the <BODY>
tag to specify the color of visited links. |
TEXT attribute: Used in the <BODY>
tag to specify the color of text which is not part of a link. |
![]() | ![]() | ![]() | ![]() | ![]() |
![]() | ![]() | ![]() | ![]() | |