A text line enclosed with <pre> tag should preserve white space and most of the time will pre-format the font (usually Courier).

Generally browsers do following actions

  • May leave white space intact;
  • May render text with a fixed-pitch font;
  • May disable automatic word wrap;
  • Must not disable bidirectional text processing.

Syntax:

<pre></pre>

Attributes:

Example

HTML preformatted text element:

 

›› go to examples ››