HTML: The Markup Language Reference

prepreformatted text # T

The pre element represents a block of preformatted text, in which structure is represented by typographic conventions rather than by elements.

Permitted contents #

Permitted attributes #

global attributes
Any attributes permitted globally.

Additional constraints and admonitions #

Tag omission #

A pre element must have both a start tag and an end tag.

Permitted parent elements #

any element that can contain flow elements

DOM interface #

interface HTMLPreElement : HTMLElement {};

Typical default display properties #

pre {
display: block;
font-family: monospace;
white-space: pre;
margin: 1em 0; }