Open and Close Tags
The majority of HTML tags do require both an open and a close tag (a begin and end tag). Most are very easy to understand because the tag is obvious. Here are a few and what they do to text:
Can I Use Two Tags at Once?
Yes. Just make sure to begin and end both. Like so:
<B><I>Bold and Italic</I></B> gives you
Bold and Italic
<B><TT>Typewriter and Bold</TT></B>
gives you Typewriter and Bold
If you do use multiple tags to alter text, make a point of not getting the end tags out of order. Look at this:
<B><I><TT>Text Text</TT></B></I>
In terms of format, the example above is not correct. The end tags are out of order in relation to the start tags.
Follow this rule:
Always set the beginning and end tags at the same time, always
placing them on the farthest end of the item being affected.
Here, again, is the example above in correct form:
<B><I><TT>Text Text</TT></I></B>
Notice the Bold tags are on the far ends. Next in line are the Italics and finally the Typewriter Text tags are closest to the affected text. Just keep setting commands at the farthest ends each time you add them and you'll stay in good form.
Single Tags
The open and close tag format dominates the majority of the available HTML tags, but there are tags that stand alone. Here are three I use extensively:
| tag |
What It Does |
| <HR> |
This command gives you a line across the page. (HR stands for Horizontal Reference.)
The line right above the words "Single tags" was made using an
<HR> tag. |
| <BR> |
This BReaks the text and starts it again on the next line. Remember you saved your document as TEXT so where you hit ENTER to jump to the next line was not saved. In an HTML document, you need to denote where you want every carriage return with a <BR>. |
| <P> |
This stands for Paragraph. It does the exact same thing as the <BR> above except this tag skips a line. BR just jumps to the next line, P skips a line before starting the text again. |