Lesson 3
If you used the HTML you learned in Lesson Two to make a page for yourself, you probably learned a couple of things... First, it works.
Second,
if you only use those few tags you learned in lesson Two, necessary as
they may be, your page will look really, Really, UGLY!!
Don't lose heart, it does get better. After this lesson, and the next, your page will look much better.
The Incredible Body Tag
Remember the BODY tags? That's
the pair of tags from the last lesson which shows where the body of the
document begins and ends. All of your content goes between the opening
and closing Body tags.
The last lesson showed you a really bare-bones body tag. Let's beef it up a bit, and see what it can do...
If you'll recall, the Body tags look like this:
Well,
our supercharged Body tags are a bit more complicated, but well worth
learning about. The Body Tag controls a lot of what your page will look
like. Here's an example:
<BODY BGCOLOR=white TEXT=black LINK=blue ALINK=green VLINK=red> </BODY> |
Now is that a mouthfull, or what? Don't let it scare you, it's all pretty simple once you break things down a little.
An HTML Tag has different parts, but they are all set up in a very standard way.
<ELEMENT ATTRIBUTE=value> |
In the Body tag example above, BODY is the element, and BGCOLOR, TEXT, LINK, ALINK, and VLINK are the attributes.
The Element tells what the tag is in a general way, and the Attributes describe the tag more specifically.
Let's look at each attribute in the example.
This
determines the background color for the entire page. I use white here,
but you could use red, blue, green, black, almost any common color. If
you want to get really wild, you can use a hec color code, but we'll
discuss that later.
Obviously, this controls the color of the page's text. Again, you can use almost any common color.
This
will be the color of your hyperlink before it's clicked on. Links have
to be a different color than the text, so that your visitor knows that
it's a link.
Ever
notice a link turn a different color while it's being clicked? That's
because the ALINK attribute was set to a certain color.
Once a link has been visited, the color will be whatever color the VLINK attribute specifies.
You can also effect text size by using it in a header, which is something we'll discuss in the next lesson.
A Little Background ...
The Body tag has one more spiffy attribute we need to discuss. By
Using the BACKGROUND Attribute, you can tell the browser to go find a
certain image file on your server, and use that image for the
background. This attribute will over-ride whatever you specify for a
bgcolor.
In order to use the Background attribute, you need to
have the address of an image file on the web. Here's the same Body tag
example we started with, but with a Background attribute.
<BODY BGCOLOR=white TEXT=black LINK=blue ALINK=green VLINK=red BACKGROUND="http://dis.dozier.com/chalk.jpg"> </BODY> |
Make sure you place the url in quotation marks!
Stand Alone Tags
Remember how I told you in lesson two that most HTML tags work in pairs, but that there are a few exceptions? Here they are: Remember to take out this ! when ever you see it. I have to put this in or the code will not show.
<P> | | <!BR> | | <!HR> |
Paragraph | Line Break | Horizontal Rule |
Technically,
the PARAGRAPH tag is not really a stand alone tag. But, you don't have
to use a closing tag for it, and hardly anybody ever does, so I've
included it here.
Use the Paragraph tag whenever you begin a
new paragraph. This will leave a blank line wherever you use it. (Like
between paragraphs!)
The Line break tag will force your text to start on the next line.
Finally, the Horizontal Rule tag will give you a thin black line across your page.
Just to help out a bit if you want to Join this FREE site It will help you practice what we learn here.
Main Forum
Main Page
Lesson 1
Lesson 2
Lesson 3
Lesson 4
Lesson 5
Lesson 6
Daniel