1 out of 6 rated this helpful - Rate this topic

pre element | pre object

[This documentation is preliminary and is subject to change.]

Renders text in a fixed-width font.

Document Object Model (DOM) Level 2 HTML Specification, Section 1.6.5HTML 4.01 Specification, Section 9.3.4

Standards information

HTML information

Closing Tagrequired
CSS Displayblock

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

xmp

 

 

Build date: 3/8/2012

Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
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-!)