This chapter introduces more tags which are used to vary the appearance of web documents. The objectives important to this chapter are:
Logical tags in HTML modify the presentation of text without
specifying the exact appearance desired. Some are:
Physical tags specify the appearance of text that they modify.
Some web page authorities do not like them, since they cannot be used
by browsers that cannot show text in the manner specified. Other developers
like them for the control they give the web page creator. I will use some
in the following list, and you can tell me if your browser supports them.
Some frequently used ones are:
Since we are on the subject, remember that tags are mostly used in pairs.
If you open a tag, you should close it, too. Also, if you nest your tags,
say for Bold and Italic, you should close them in the reverse order
of opening them. For instance:
<B><I>This is the text.</I></B>
This format is correct. I closed the Italic tag first, because I opened it second. This is how you nest tags.
Another useful physical control is the Preformatted tag: <PRE>. It means to retain the spaces, tabs and line returns in the original source document. This may not seem like much until you realize that the browser throws away extra white space when it formats text. It is much easier to make a quick chart or table if you use Preformatted text.
Most pages you view have Horizontal Lines on them made with the <HR>
tag. This tag originally needed no closing tag. In XHTML, it will be written
differently and considered self closing: <HR /> It is usually
placed on a line by itself in the source page, indicating the place you
want a line drawn. There are several extensions to the <HR>
tag in HTML 3.2, which are not supported by all browsers. If you want
to use them, they are options inside the angle brackets like this:
The command I have used a lot in this page to make sure that text breaks to a new line is the <BR> tag, called the Line Break tag. It is useful whenever you need to start a new line. It, too, is adapted for XHTML. The new form is <BR />
The Address tag, <ADDRESS> tag, is used to allow search engines to find address information on your pages. It is a convention that pages should have such a tag in order for the author to be easily found. The information you put in such a tagged section may be your e-mail address, your land mail address, your phone number, or whatever you choose.
It is worth mentioning, for those who may want to write scholarly or formal documents in HTML, that there are formal tags for quotations. The <BLOCKQUOTE> tag and its partner should be used to enclose quoted material from other sources. I would use it if I were to type a whole paragraph from the textbook here, verbatim, instead of paraphrasing and explaining.
Some characters cannot be easily displayed in HTML documents. For instance,
how am I showing you tags on this document? A tag is a command that is
obeyed, not displayed. So, in order to type something on a web page that
looks like a tag, I have to use special characters to stand for
the angle brackets. The tags are:
Aligning text is not an exact science yet. Your best bet is to put text that must be centered, right aligned, or left aligned inside a Heading tag. The Heading tags allow us to use the ALIGN option to specify the three kinds of alignment.
Fonts can be modified easily since HTML 3.2, first by using the <BIG> and <SMALL> tags already mentioned. Also, you can use the <FONT> tag with the SIZE= option in two ways. Setting the SIZE value to a number from 1 to 7 will be understood by the browser as an increase or decrease from the default relative size of 3. This means that the text the browser will display by default is considered to be size 3. Sizes 1 and 2 are smaller than the default, sizes 4, 5, 6, and 7 are larger. You can also set the option with a plus or minus and a number, such as +2, which would mean two levels larger than the surrounding text, which might be different from two levels larger than the default text. After all, the surrounding text might already have been modified.
A special change for the List format tags is to change the dingbat used
by the Unordered lists. To do so you can use any of these:
Finally, you can vary the "bullet" for the Ordered lists by setting
the type to be any of these:
Laura discusses the use of the <blink> tag, advising you not to use it. I agree, and suggest that readers will not appreciate blinking or look at your page long if it contains blinking text.