XML technologies / HTML & XHTML / Alphabetical list of HTML and XHTML elements / pre

(Excerpt from "HTML & XHTML ─ kurz & gut" by Jennifer Niederst Robbins)

A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z

   

pre

HTML 4.01 | HTML 5

<pre> ... </pre>

Marks preformatted text. Lines appear exactly as entered. Spaces and line breaks appear as in the document source. By default, preformatted text uses a monospaced font such as Courier. The example below would look exactly as shown here in a browser.

Start/end tag

Required/required

Attributes

Core, internationalization, events, global HTML 5 attributes

  • width="Zahl"

    Deprecated. Not in HTML 5. This optional attribute specifies the number of characters in a line within the pre block.

  • xml:space="preserve"

    XHTML only. Instructs XML processors to preserve whitespace within the element.

Example

<pre>
Dies ist          ein                         Beispiel für

       Text mit einer            Menge
                               seltsamer                  
                             Leerzeichen.
</pre>

 

> back to the alphabetical list of elements

   

 

 

 

back to top