HTML: The Markup Language

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 content #

Permitted attributes #

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; }