HTML Cookbook Basic HTML Course

It's Easy!

Alternate version

Pre-formatted Text

<pre>...</pre>

Pre-formatted text allows us to show line breaks and blank lines on our pages without using <p> or <br />.

The <pre> tag displays text on a page the way it is actually entered. So if you hit 'Return' to get new lines, you would not have to use a <br /> after each line. This is great for copying text, such as a poem, into your page.

Example

If you enter:
<pre>
line one
line two
line three
line four
</pre>
You will see
line one 
line two
line three
line four
instead of
line one line two line three line four

Happy coding!
Gnubee

Links
Tips
Tools
References
Rules
HTML Help Gnubee - Newsgroup
HTML Course Contents (Home)

Valid XHTML 1.0!

Valid CSS!