Text Content
HTML <pre> element
Preserves meaningful whitespace and line breaks in preformatted text. Escape markup characters when displaying literal HTML. Whitespace and line breaks are significant in normal default presentation. Escape literal markup when displaying source code; nesting code provides useful semantics. Long lines can overflow, so use appropriate CSS for scrolling or wrapping. It accepts global HTML attributes; individual global features may be inapplicable or restricted.
Formal Syntax & Structure
html syntaxhtml
<pre>Preformatted text</pre>Return Value
HTMLPreElement
Content model: Phrasing content, with element-specific restrictions.
Working Example
Example Snippethtml
<!doctype html><html lang="en"><head><meta charset="utf-8"><title>HTML example</title></head><body><pre>Room A 10 seatsRoom B 8 seats</pre></body></html>