File: pre.html

package info (click to toggle)
perlsgml 1996Oct09-6
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 2,452 kB
  • ctags: 792
  • sloc: perl: 4,639; makefile: 167
file content (139 lines) | stat: -rw-r--r-- 4,224 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<HTML>
<HEAD>
<TITLE>HTML 2.0 DTD: PRE element</TITLE>
</HEAD>
<BODY>
<H1>PRE</H1>
<P>
The &lt;PRE&gt; element represents a character cell block of text and is
suitable for text that has been formatted for a monospaced font.
</p>
<p>
The &lt;PRE&gt; tag may be used with the optional WIDTH attribute. The
WIDTH attribute specifies the maximum number of characters for a line
and allows the HTML user agent to select a suitable font and
indentation.
</p>
<p>
Within preformatted text:
</p>
<ul>
<li>Line breaks within the text are rendered as a move to the
beginning of the next line.
<dl>
    <dt>NOTE</dt>
    <dd>References to the "beginning of a new line"
    do not imply that the renderer is forbidden from
    using a constant left indent for rendering
    preformatted text. The left indent may be
    constrained by the width required.</dd>
</dl>
</li>
<li>Anchor elements and phrase markup may be used.
<dl>
    <dt>NOTE</dt>
    <dd>Constraints on the processing of &lt;PRE&gt;
    content may limit or prevent the ability of the HTML
    user agent to faithfully render phrase markup.</dd>
</dl>
</li>
<li>Elements that define paragraph formatting (headings,
address, etc.) must not be used.
<dl>
    <dt>NOTE</dt>
    <dd>Some historical documents contain &lt;P&gt; tags in
    &lt;PRE&gt; elements. User agents are encouraged to treat
    this as a line break. A &lt;P&gt; tag followed by a
    newline character should produce only one line
    break, not a line break plus a blank line.</dd>
</dl>
</li>
<li>The horizontal tab character (code position 9 in the HTML
document character set) must be interpreted as the smallest
positive nonzero number of spaces which will leave the
number of characters so far on the line as a multiple of 8.
Documents should not contain tab characters, as they are not
supported consistently.
</li>
</ul>
<p>
Example of use:
</p>
<pre>
&lt;PRE&gt;
Line 1.
       Line 2 is to the right of line 1.     &lt;a href="abc"&gt;abc&lt;/a&gt;
       Line 3 aligns with line 2.            &lt;a href="def"&gt;def&lt;/a&gt;
&lt;/PRE&gt;
</pre>
<HR>
<H2>Content</H2>
<UL>
<LI>#PCDATA</LI>
<LI><A HREF="a.html"><STRONG>a</STRONG></A> -- Anchor; source and/or destination of a link
</LI>
<LI><A HREF="b.html"><STRONG>b</STRONG></A> -- Bold text
</LI>
<LI><A HREF="br.html"><STRONG>br</STRONG></A> -- Line break
</LI>
<LI><A HREF="cite.html"><STRONG>cite</STRONG></A> -- Name or title of cited work
</LI>
<LI><A HREF="code.html"><STRONG>code</STRONG></A> -- Source code phrase
</LI>
<LI><A HREF="em.html"><STRONG>em</STRONG></A> -- Emphasized phrase
</LI>
<LI><A HREF="hr.html"><STRONG>hr</STRONG></A> -- Horizontal rule
</LI>
<LI><A HREF="i.html"><STRONG>i</STRONG></A> -- Italic text
</LI>
<LI><A HREF="kbd.html"><STRONG>kbd</STRONG></A> -- Keyboard phrase, e.g. user input
</LI>
<LI><A HREF="samp.html"><STRONG>samp</STRONG></A> -- Sample text or characters
</LI>
<LI><A HREF="strong.html"><STRONG>strong</STRONG></A> -- Strong emphasis
</LI>
<LI><A HREF="tt.html"><STRONG>tt</STRONG></A> -- Typewriter text
</LI>
<LI><A HREF="var.html"><STRONG>var</STRONG></A> -- Variable phrase or substitutable
</LI>
</UL>
<HR>
<P>
<A HREF="pre.attr.html"><STRONG>ATTRIBUTES</STRONG></A><BR>
<A HREF="pre.cont.html"><STRONG>CONTENT DECLARATION</STRONG></A>
</P>
<DL>
<DT><STRONG>Tag Minimization</STRONG><DD>
Open Tag: <EM>REQUIRED</EM><BR>
Close Tag: <EM>REQUIRED</EM><BR>
</DL>
<HR>
<H2>Parent Elements</H2>
<UL COMPACT>
<LI><A HREF="blockquote.html"><STRONG>blockquote</STRONG></A> -- Quoted passage
</LI>
<LI><A HREF="body.html"><STRONG>body</STRONG></A> -- Document body
</LI>
<LI><A HREF="dd.html"><STRONG>dd</STRONG></A> -- Definition of term
</LI>
<LI><A HREF="form.html"><STRONG>form</STRONG></A> -- Fill-out or data-entry form
</LI>
<LI><A HREF="li.html"><STRONG>li</STRONG></A> -- List item
</LI>
</UL>
<HR>
<P>
<A HREF="TOP-ELEM.html"><STRONG>Top Elements</STRONG></A>
<BR>
<A HREF="ALL-ELEM.html"><STRONG>All Elements</STRONG></A>
<BR>
<A HREF="ENTS.html"><STRONG>General Entities</STRONG></A><BR>
<A HREF="DTD-TREE.html#pre"><STRONG>Tree</STRONG></A>
</P>
<HR>
<ADDRESS>
<A HREF="DTD-HOME.html">HTML 2.0 DTD</A>
</ADDRESS>
</BODY>
</HTML>