mozilla

Revision 1792 of <pre>

  • Revision slug: HTML/Element/pre
  • Revision title: pre
  • Revision id: 1792
  • Created:
  • Creator: ethertank
  • Is current revision? No
  • Comment See also section; 21 words added

Revision Content

Summary

This element represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed.

Attributes

Like all other HTML elements, this element has the global attributes.

Examples

<!-- Some example CSS code -->
<pre>
body {
  color:red;
}
</pre> 

Result

body {
  color:red;
}

See also

  • CSS: {{ Cssxref('white-space') }}, {{ Cssxref('word-break') }}
{{ HTML:Element_Navigation() }}
{{ languages({ "en": "en/HTML/Element/pre", "ja": "ja/HTML/Element/pre" }) }}

Revision Source

<h2 id="Summary">Summary</h2>
<p>This element represents preformatted text. Text within this element is typically displayed in a non-proportional font exactly as it is laid out in the file. Whitespaces inside this element are displayed as typed.</p>
<h2 id="Attributes">Attributes</h2>
<p>Like all other HTML elements, this element has the <a href="/en/HTML/Global_attributes" rel="internal">global attributes</a>.</p>
<h2 id="Examples">Examples</h2>
<pre class="brush: html">&lt;!-- Some example CSS code --&gt;
&lt;pre&gt;
body {
  color:red;
}
&lt;/pre&gt; 
</pre>
<h3 id="Result">Result</h3>
<pre>body {
  color:red;
}
</pre> <h2 id="See_also">See also</h2>
<ul>
<li>CSS: {{ Cssxref('white-space') }}, {{ Cssxref('word-break') }}</li>
</ul>
<div>{{ HTML:Element_Navigation() }}</div>
<div>{{ languages({ "en": "en/HTML/Element/pre", "ja": "ja/HTML/Element/pre" }) }}</div>
Revert to this revision