|
If you used the HTML you learned in
Lesson 2 to make a personal page, you probably learned a few new
things about HTML. However, you will also notice that with these
tags alone, your page will look pretty bare and undeveloped. Here
are some additional tags to try:
The Incredible
Body Tag
You may remember the BODY tags from Lesson 2. The Body tags were that
pair of tags from the last lesson that showed us where the body of
the document began and ended. All of your content belongs between the
opening and closing BODY tags.
If you recall, the Body tags look like
this:
Moving toward greatness, our BODY tags
will be getting a bit more complicated, but well worth learning.
The BODY tag controls much of what your page will look like when
displayed in a browser. Here's an example:
|
<BODY BGCOLOR=white
TEXT=black LINK=blue ALINK=green VLINK=red></BODY>
|
In the BODY tag example above, BODY
is the element, and BGCOLOR, TEXT, LINK, ALINK, and VLINK are the
attributes. The Element describes what the tag is in a general way,
and the Attributes describe the tag in a specific way.
Let's look at each attribute in the
example
BG in this instance stands for background color. BGCOLOR=white
means that the background color for the entire page will be white.
This statement will control the color
of the page's text.
This statement indicates that all hyperlinks
on your page will be blue before it
is clicked on. Links have to be a different color than the text,
so that your visitor knows recognizes a link.
This statement indicates to the browser
what color (purple) the link will turn when your mouse hovers over
it.
This statement indicates that all visited
hyperlinks on your page will be red after it
is clicked on. Visited links are a different color than the page
links, so that your visitor will know which link he or she has followed.
A Little
Background
The BODY tag has one more 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
override whatever you specify for a bgcolor.
|
<BODY BGCOLOR=white
TEXT=black LINK=blue ALINK=green VLINK=red BACKGROUND="me.gif">
</BODY>
|
NOTE: Make sure you place the image in quotation marks!
Stand Alone Tags
Recalling that most HTML tags work in pairs but that there are a few
exceptions, here is an illustration of some exceptions:
|
<P>
|
|
<BR>
|
|
<HR>
|
|
Paragraphs
|
Line Breaks
|
Horizontal Rules
|
Technically,
the PARAGRAPH tag <P> is
not really a standalone tag. However, you do not have to use a closing
tag with it. Use the Paragraph tag whenever you begin a new paragraph.
The line break tag <BR> will force your text or image to the
next line without leaving a large space. The Horizontal Rule <HR> tag
will give you a thin black line across your page.
|