section 2: formatting paragraphs


The <PRE> tags

Another method similar to the P tag is the <PRE> tag. This is similar to the P tags where there is a half line seperation between the paragraph above and below the paragraphs that is enclosed by the PRE tags. The difference is that the font used for paragraphs with PRE tags is of fixed width. That makes it ideal for things like computer program listings, etc. An example of the use of the PRE tag would be...

<BODY>
<P>The following is an example piece of C code that is displayed using the
PRE tags rather than the P tags.
</P>
<PRE>
for( i=0; i < number_of_characters; i++ )
</PRE>
<P>
The result is a paragraph written in a fixed width font rather than a
variable width font. The line spacing between paragraphs is still evident
with the PRE tags.
</P>
</BODY>

Note: Occasionally you might paragraph formatting tags such as <LISTING>, <PLAINTEXT> and <XMP>. These have been made obsolete by the latest HTML standard (version 4.0) and shouldn't be used.
Next: Headline styles

back start next