pre element | pre object
[This documentation is preliminary and is subject to change.]
Renders text in a fixed-width font.
![]() ![]() |
Standards information
- Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5
- HTML 4.01 Specification, Section 9.3.4
HTML information
| Closing Tag | required |
|---|---|
| CSS Display | block |
DOM Information
Inheritance Hierarchy
Node
Element
HTMLElement
pre
Remarks
Text within the PRE element is formatted. Spaces and carriage returns are preserved.
Examples
This example uses the PRE element to format text so that it renders exactly as it is typed.
<PRE>
This text is formatted
exactly
as
it
is
typed.
</PRE>
See also
Build date: 3/8/2012
WRAP does not work - attributes
I've tried the obvious--
<pre wrap=soft style=width:10em;OVERFLOW-X:hidden>...this should wrap...</pre>
--and, variants, and, turning off OVERFLOW-X in case that was troubling,...
(Purpose: replace TEXTAREA with [PRE] to speed-up 1.3MB-unicode-Paste and RegExp-editing ... where TEXTAREA takes 1:00 minute but [PRE] only 0:05 -'wow' that's fast-!)
<pre wrap=soft style=width:10em;OVERFLOW-X:hidden>...this should wrap...</pre>
--and, variants, and, turning off OVERFLOW-X in case that was troubling,...
(Purpose: replace TEXTAREA with [PRE] to speed-up 1.3MB-unicode-Paste and RegExp-editing ... where TEXTAREA takes 1:00 minute but [PRE] only 0:05 -'wow' that's fast-!)
- 6/19/2008
- Mr. Raymond Kenneth Petry

