Question: What is pre-formatted text?
Answer:
Pre-formatted text is a wonderful tool to force the text to look more like you want it to look. Well, not exactly, but the <pre></pre> tag creates text with the linebreaks and spacing that you put in. To do this, most browsers render the <pre></pre> tag with a mono-spaced font. This is a font that is the same width for every letter, even i and w.
Try the <pre> tag on your Web site with various different spacings and carriage returns. For example, try pasting the following into your Web page HTML (leave the spaces exactly as they are written):
<pre>
Twas brillig and the slithey toves
Did gyre and gimble
in
the
wabe</pre>
The <pre> tag does more than just keep the spaces. In most browseres, it is also written in a monospace font. But you can change this with style sheets.
Learn more about the <pre></pre> tag.
More Web Design / HTML Q&A
