HTML 3.2 includes no fewer than 23 container tags whose purpose is to control the appearance of the displayed text. Many of these are obsolescent or rarely used. These can be split into two groups, depending on whether they cause a line break or not. None of them have any attributes.
This group of 6 tags cause line breaks. Their effect is illustrated in the table below. In all cases the text This is a block <br>of two lines illustrating the effect of the <tag> tag. is included within the tags.
tag | meaning | example |
---|---|---|
address | Contains an address. The devisors of HTML hoped that this would be used to enclose addresses so that addresses could be recognised as such by indexing and cataloguing software. The enclosed text is commonly rendered using an italic typeface. Microsoft Internet Explorer 3 seems to forget to switch out of italic on encountering </address> under some circumstances. | This group of 6 tags cause line breaks.
Their effect is illustrated in the table below.
In all cases the text
This is a block of two lines illustrating the effect of the <address> tag. is included within the tags. |
blockquote | Encloses blocks of text that are quotations, usually with distinguishing indentation | This group of 6 tags cause line breaks.
Their effect is illustrated in the table below.
In all cases the text This is a blockis included within the tags. |
listing | Encloses preformatted text. Obsolete | This group of 6 tags cause line breaks.
Their effect is illustrated in the table below.
In all cases the text of two lines illustrating the effect of the <listing> tag |
plaintext | Switches from HTML to preformatted text. Obsolete. The HTML 3.2 standard, suggests, incorrectly, that this is equivalent to <pre>, actually it is equivalent to </html> Netscape 3.0 gets this right, Microsoft Internet Explorer 3 gets it wrong, if you accept that HTML 3.2 got it wrong. | No example included as this would cause Netscape 3.0 to break |
pre | Encloses preformatted text. | This group of 6 tags cause line breaks.
Their effect is illustrated in the table below.
In all cases the text This is a blockis included within the tags. |
xmp | Encloses preformatted text. Obsolete | This group of 6 tags cause line breaks.
Their effect is illustrated in the table below.
In all cases the text of two lines illustrating the effect of the <xmp> tag. |
It is interesting that, using Microsoft Internet Explorer 3 the supposedly obsolete <listing>, <plaintext> and <xmp> have the effect of turning off all HTML mark-up interpretation. Using Netscape 3.0 only <xmp> has this effect. <listing> seems to imply a smaller typeface than <plaintext> and <xmp> using Microsoft Internet Explorer 3.0 The HTML 3.2 standard gives no hint of these aspects of browser behaviour.
This group of 17 tags controls the appearance of in-line text. The <font> tag is not discussed in this document. It can be used to achieve some of the effects shown here.
These tags can be split into two broad groups known as font tags and phrase tags. These are sometimes known as physical and logical tags. The purpose of font tags is to control the physical appearance of the text whereas the phrase tags are intended to affect the interpretation of the contained text by software.
In particular the phrase tags could be used by software other than conventional browsers to, for example, render text in a special way for visually handicapped users or to guide the interpretation of text by cataloguing or indexing software. The fact that most HTML authors seem unaware of this means that the distinction is less useful than it ought to be.
Here's a list of all 17 tags showing their effect. It is normally possible to nest these tags to produce more complex effects but the results are, at best, unpredictable although experimentation can be great fun.
In the following table the text sat on the is enclosed within the tag in question. The table entries link to more detailed information about the particular tags.
tag | type | meaning | example |
---|---|---|---|
b | font | bold | the cat sat on the mat |
big | font | big, i.e. one extra unit of size, equivalent to <font size=+1> | the cat sat on the mat |
cite | phrase | citation, used for citations and references to other sources - rarely used | the cat sat on the mat |
code | phrase | code, used to show extracts of code from computer programs | the cat sat on the mat
|
dfn | phrase | definition, i.e. a defining instance of an item. The HTML 3.2 authors hope that browsers might collect such items and create a hyperlinked glossary of all items defined in a page | the cat sat on the mat |
em | phrase | emphasis | the cat sat on the mat |
i | font | italic | the cat sat on the mat |
kbd | phrase | keyboard, used to indicate user keyboard input in computer software documentation - obsolescent | the cat sat on the mat |
samp | phrase | sample, used to show sample output from computer programs etc. | the cat sat on the mat |
small | font | small, one less unit of size, equivalent to <font size=-1> | the cat sat on the mat |
strike | font | strike through | the cat |
strong | phrase | strong | the cat sat on the mat |
sub | font | subscript | the cat sat on the mat |
sup | font | superscript | the cat sat on the mat |
tt | font | teletype, i.e. monopitch text | the cat sat on the mat |
u | font | underline | the cat sat on the mat |
var | phrase | variable, used for variables or arguments to commands in computer software documentation - rarely used | the cat sat on the mat |
The descriptions are largely taken from the HTML 3.2 standard. In spite of the impression created by these descriptions, they can be used for purposes other than documenting computer software.