Menu Home

pre

osbo.com | HTML | Elements | pre

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

Syntax

HTML

<pre attribute-name="attribute-value"></pre>

Attributes

Global

CSS

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

Examples

CSS

Web Hypertext Application Technology Working Group (WHATWG)