PRE
The PRE element is used to enclose text to be
displayed with a fixed width typewriter-like
font. This is useful for presenting text that has
been formatted for a teletype, or for a fixed width
character display.
In particular, as standard HTML does not contain
a TABLE element the PRE element is the only
way in which structured tables can be properly
displayed.
- Things to Avoid
-
You should NOT use elements that define paragraph
formatting within the PRE element. This means you should
not use
<P>, <ADDRESS>, <Hn>
and so on. You
should avoid the use of tab characters -- use single blank
characters to space text apart.
- Things That are OK
- You can use Anchor. A typed carriage return will
cause a new line in the presented text.
Example
<PRE WIDTH=30>
Hi there. This is a rather stupid example.
Lord only knows what I was thinking at the time. I
suppose I should get more sleep when I do this stuff. But
why should I try and write Shakespearean sonnets when it is
just a stupid example of the <A HREF="pre.html">PRE</A> element!
</PRE>
Content
- #PCDATA
- a -- Anchor; source and/or destination of a link
- b -- Bold text
- br -- Line break
- cite -- Name or title of cited work
- code -- Source code phrase
- em -- Emphasized phrase
- hr -- Horizontal rule
- i -- Italic text
- kbd -- Keyboard phrase, e.g. user input
- samp -- Sample text or characters
- strong -- Strong emphasis
- tt -- Typewriter text
- var -- Variable phrase or substitutable
- Tag Minimization
-
Open Tag: REQUIRED
Close Tag: REQUIRED
See ATTRIBUTES
See CONTENT DECLARATION
Parent Elements
- blockquote -- Quoted passage
- body -- Document body
- dd -- Definition of term
- form -- Fill-out or data-entry form
- li -- List item
Top Element List
All Element List
Tree
HTML 2.0 DTD