HTML Dog

Skip to navigation

HTML Tag: pre

Preformatted text. Text where the whitespace (that is normally discarded by other elements) is as much a part of the content as the rest of the text. Commonly used to display computer code because it maintains nesting indentations.

Required Attributes

Optional Attributes

Example


<p>The basic structure of an HTML document:</p>
<pre>
<code>&lt;html&gt;</code>
	<code>&lt;head&gt;</code>
	<code>&lt;/head&gt;</code>
	<code>&lt;body&gt;</code>
		<code>[stuff]</code>
	<code>&lt;/body&gt;</code>
<code>&lt;/html&gt; </code>
</pre>