HTML
The Wonderful Text Tags
Okay, it's time to start making our text appear in different
ways. Let's start by giving you some tags to work with:
<B></B> This is the tag for bold text.
Example:
<B>Howdy</B>
This will show up on your page like this:
Howdy
Here are a few more to start working with: <U></U> Underline text
<U>Underline Me!</U>
This will show up on your page like this:
Underline Me!
<I></I> Italics
<I>Isn't this fun?</I>
This will show up on your page like this:
Isn't this fun?
<STRIKE></STRIKE>
<STRIKE>You're Out!</STRIKE>
This will show up on your page like this:
You're Out!
<CENTER></CENTER>
<CENTER>This centers text on the page</CENTER>
This will show up on your page like this:
This centers text on the page
Having fun yet? You can also use more than one tag at a time. Let's say
you wanted something in bold and italics. To do this, just place both
opening tags before the text.....and remember to close both tags
afterwards....like this:
<B><I>I am bold AND Italic, which makes me
cool!</I></B>
This will show up on your page like this:
I am bold AND Italic, which makes me cool
Does the order of the tags make a difference? In this case, it wouldn't
matter which way you opened and closed the tags. However, working from
inside out will help you see your code better, and will help when the
order does matter! (such as placing the </HTML> tag before the </BODY>
tag). Here's another way to look at working inside out. I could write the
HTML this way
<B>
<I>
I am bold AND Italic, which makes me cool!
</I>
</B>
This could get rather tedious. All you need to remember is that the text
you have written is affected by every tag before it that has not been
closed. The effect ends when each one of those tags is closed by it's
closing tag. So lets try three things: Bold, Italic, and underline!
<B><I><U>Would you stop tagging me!</B></I></U>
This will give us:
Would you stop tagging me!
But this:
<U><I><B>Would you stop</B></I>tagging me!</U>
would give us this!
Would you stop tagging me!
As you can see, the bold and italics were closed before the word
"tagging"....but the underline remained open until the end of the
exclamation. This caused the "tagging me!" portion to be underlined,
while not being affected by the bold or italics tags! Now let's use
the center tag from above. Since the default alignment of everything is
to the left, it's nice to have a way to place things in the center of
the page. So let's do just that. Use the <CENTER> tag. Anything you
place between the <CENTER> and </CENTER> tags will be centered on the
page. Here is an example:
<CENTER>I'm in the middle!</CENTER>
This will give us the following:
I'm in the middle!
You can also use it with one or more of the other tags above, like this:
<CENTER><B><I>Look at me now!</I></B></CENTER>
This will show up like this:
Look at me now!
Now you may be wondering why everything is just on one line. Well, in
the next section, I'll show you how to make the text move to the next
line with the line break tag. You'll also see how to use headings and
paragraphs. So, let's move on to the next step, where you will learn
about headings, paragraphs, and line breaks.
---------------------------------
Check out the hottest 2008 models today at Yahoo! Autos.