What
are "nested tags"? This is just like those little novelty
boxes you can buy that come nested inside each other, each with
their own lid. You can't put the biggest lid on the smallest
box and expect them to fit in the medium box, right?
When
you use several different tags with one line (or page) of text,
you should close the tags in the reverse order, just like our
nested boxes. Suppose you want to center a line of text, but
you also want it to be purple Arial Narrow size +1. You should
write it like this:
<center><font
face=arial narrow color=FF00FF size=+2>Do you see how the font tags are
"nested" inside the center tags?</font></center>
Some
other tags you can add to text are:
<B>To
make the text bold</B>
<I>To make the text italicized</I>
<U>To make the text underlined</U>
All or
any of the tags may be nested together, as long as you close
them in the proper order. Let's take the example above and also
make it italicized and underline it:
<center><I><U><font
face=arial narrow color=FF00FF size=+2>Do you see how
all of the tags are "nested" inside the center tags?</font></U></I></center>
The exact
order you use the tags is usually not important, as long as they
are closed in the reverse order. The above example could also
be written:
<center><font
face=arial narrow color=FF00FF size=+2><U><I>Do you see how
all of the tags are "nested" inside the center tags?</I></U></font></center>
So to
recap, ALWAYS close your tags, AND close them in the proper order. There
are times when your HTML will work if you don't do it right,
but it's a sloppy habit to get in to, and if your text doesn't
display the way you wanted, it's harder to find the problem.
Want
to learn some more?
Next page
Table of Contents
|