Preformatted Text | WebReference

Preformatted Text

HTML 4.01 Element Reference

By Lee Underwood

Return to HTML 4.01 element index page

Name: Preformatted Text

<pre> ... </pre>

Description: Used to indicate text that is already formatted. Tabs, returns, and spaces are displayed as they are written. Usually rendered as a monospaced font.

Browser Compatibility: NN: 1.0+ / IE: 2.0+ / Opera: 4+

Attributes:
  • class
  • dir
  • id
  • lang
  • onclick
  • ondblclick
  • onkeydown
  • onkeypress
  • onkeyup
  • onmousedown
  • onmousemove
  • onmouseout
  • onmouseover
  • onmouseup
  • style
  • title
  • width*

* Deprecated

Code Example:

<pre>
#include <stdio.h>
  void main()
    {
      printf("Hello World!\n")'
    }
</pre>



Created: March 15, 2005

URL: http://webreference.com/html/reference/specs/