1. Home
  2. Computing & Technology
  3. Web Design / HTML

<pre></pre>

By , About.com Guide

<pre> Description:

The <pre></pre> tag defines the enclosed text as pre-formatted.

<pre> Web Browser Support:
<pre> Attributes:
<pre> End Tag:
</pre> REQUIRED
<pre> Contents:

Text. The following tags are valid within the <pre> tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, code, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, textarea, tt, u, var

<pre> Valid Context:

The <pre> tag is valid within the following tags:
blockquote, body, button, center, dd, div, fieldset, form, iframe, li, noframes, noscript, object, td, th

<pre> Usage:
  • pre-formatted text
    <pre>
        x | o | x
       -----------
        o | o | x
       -----------
        o | x | x
    </pre>
<pre> Special Notes:
  • This tag usually displays the information in a monospaced font. But if you need your text to be monospaced, use the <tt> tag.
  • The width attribute is only there as advice for the browser, and many older browsers don't honor it.
More <pre> Information:

Return to XHTML Element (HTML Tags) Library

Explore Web Design / HTML
About.com Special Features

Holiday Central

What to eat, where to go, fun things to do and how to save money on the perfect gifts. More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

  1. Home
  2. Computing & Technology
  3. Web Design / HTML

©2009 About.com, a part of The New York Times Company.

All rights reserved.