<pre>
HTML <pre> Element Reference
The HTML <pre> element preserves whitespace and displays preformatted text as it appears in the source.
Categories
- Flow content
- Palpable content
Tag omission
Neither the start tag nor the end tag may be omitted.
Content model
- Phrasing content
Attributes
Examples
Source-code block
Combine pre with code when the preserved text is source code.
<pre><code>const answer = 42;</code></pre>