Now that we've got the skeleton of our webpage laid out, we need to
decide how we want the page to look. While there's no absolute need
to play with the colors or add a background image, or do anything with
the fonts, most of us can't resist at least a little fiddling.
Unfortunately, it's this fiddling that messes us up most of the time.
Let's go through the process of individualizing our page, one step at
a time.
First, we need to tell the browsers to start looking for content, or
in other words, that the body of our document is beginning. We do
this by typing:
<body>
Body is another one of those things that need a closing tag, so go
ahead and put in:
</body>
We'll be putting the content of our page between those two
tags.
First, we need to set the variables for the background and text
color. For the background you can use either a solid color or a
background image. Both background and text color are set within the
<body> tag. It's important to note, however, that the syntax
for setting up a backgound image differs significantly from that used
to designate a background color! We'll look at simply using a
background color to start with. First, though, I need to explain how
colors are specified in html.
Html uses hexadecimal color codes. This looks daunting but is really
not all that complicated. Hexidecimal color coding uses the standard
three colors; red, green, and blue; in combination to make more than
16 million different colors. A hexidecimal color code is six digits long. The
first two digits tell us how much red is in the color, the second two
digits are for green, and the last two set the amount of blue. A
value of "00" means that there is none of that component at all in our
color. A value of "FF" means, "assign that component its maximum
value."
"Hey, wait a minute...where the heck did those F's come from?!" Glad
you asked! We don't have enough digits to count in hexidecimal. We
count 0 1 2 3 4 5 6 7 8 9 and then we start over with 10 11 12 13 and so
on. Hexidecimal doesn't do it that way. It counts 0 1 2 3 4 5 6 7 8 9 A
B C D E F. See? 16 digits instead of 10. Since we don't *have* 16
different digits, we just use letters to indicate the biggest 6.
Let's do some color mixing!