<PRE></PRE>

Display text as it appears in the document


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


Element is used to display the text enclosed using a mono-spaced font and lined up pretty much the way you enter it. Anchor and phrase elements can be used inside the PRE tags but paragraph formatting elements should not be used.

        <html>
        <head>
        <title>Some Title</title>
        </head>
        <body>
            .
            .
==>>    <PRE>
==>>        Roses are Red,
==>>            Violets are Blue,
==>>        This poem's <em>real</em> old,
==>>            And so are you.
==>>    </PRE>
            .
            .
        </body>
        </html>

The PRE element can be used to force the browser to display things spaced like you want. But the browser usually gets the last laugh because it displays the text using some hideous, mono-spaced font that really detracts from the flow of your document.

There is also a WIDTH attribute that lets you specify how many characters long each line should be. I've never used this and it's not well liked by the specification writers either. It must have been a carryover from the good, old days. Don't use it.

HTML 3.0 Draft
Adds the language attributes and a block attribute.
An attribute common to almost all of the block style tags is CLEAR.
CLEAR
Used to specify the vertical positioning of a block element. This lets you start a block below a figure or table, or next to it if there is a certain amount of space for your text. You can specify left, right or all to indicate that you want the left margin, right margin or both margins clear before you start displaying your text.

Instead of clearing the margins you can also tell the browser that if there is a certain amount of space next to a table or figure then it can display your text. You do this by putting in an amount of space in "en" units or in pixels. You would put a value such as "50 en" for 50 "en" spaces or "130 pixels" for 130 pixels.

An example of this attribute in use is:
<PRE CLEAR="50 pixels">Pre-formatted text.</PRE>
Attributes common to almost all of the tags permitted in the document body include ID, LANG and CLASS. You probably won't be using any of these tags for a while but I've included them so you know they are coming.
ID
A name to be used as a target for links or for naming particular elements in a style sheet. These take the place of the HTML 2.0 <A NAME="somename">Some Name</A> construct that defines internal document links.
LANG
An ISO standard language abbreviation that defines language specific elements to be used.
CLASS
Used to assign a class name to a tag.
An example of these attributes in use is:
<PRE ID="topicone" LANG="en-US" CLASS=section>Pre-Formatted Text.</PRE>

Netscape

Nothing special.

Microsoft IE

Nothing special.

Internationalization

Nothing special.


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


The Rusk Family . . . "the Legend Continues"

Michael T. Rusk
Comments to author: mrusk@radix.net

All contents copyright © 1996, 1997 Michael T. Rusk
All rights reserved.

Revised: December 03, 1997 10:45 -0500
URL: ./htmlgd/tagpre.html