Use the <PRE> tag (which stands for "preformatted") to generate text in a fixt-width font. (Every letter of the alphabet is the same width). This tag also makes spaces, new lines, and tabs significant - multiple spaces are displayed as multiple spaces, and line break in the same locations as in the source HTML file. This is useful for program listings, among other things. For example, the following lines:


<PRE>
Learning Centre

This text was generated by a word processor, and copied and pasted into this document, the text retains its shape, meaning, the text will look the same in the browser, as it does in the source code, even the empty spaces are preserved, and without any HTML tags inside the pre tags.
</PRE>

The <PRE> tag can be used with an optional WIDTH attribute that specifies the maximum number of characters for a line. WIDTH also signals your browser to choose an appropriate font and indentation for the text.

© Copyright 2002 Carnegie Webhead's