[Index of Lessons]
[Lesson 7] [Lesson 9]

8. Preformatted Text

In previous lessons we have seen that a web browser will ignore extraneous space characters, tabs, and carriage returns in your HTML files. However, there are some instances where it will be important to maintain these aspects of page layout.

The preformat <pre> tag instructs your web browser to display the text exactly as typed in the HTML document, including spaces, tabs, and carriage returns.

Preformatted Text
HTML Result
<pre>This

is 
an    example    of how
this will  work</pre>
This

is 
an    example    of how
this will  work
Note how by using <pre> and </pre> commands you can insert more white space into a document than using the <p> command. Seeing as how HTML code is ignored(as in the spaces they take up) in between the <pre> commands you could also do this:

Preformatted Text
HTML Result
<pre>This

<i>is</i> 
an    <u>example</u>    of how
this will  work</pre>
This

is 
an    example    of how
this will  work
From here on in, you should be used to looking at and using html to create web pages. The remaining lessons in the basic section of HTML, are not required for the creation of the web site on UFO's, Paranormal and other Mysteries. So I won't try to implement them into the site. Even though you can now make web pages, I suggest you continue looking through the rest of the basic lessons, if only for the knowledge that these special commands exist. The next set of examples will take place when you enter the advanced section on HTML. This is when the current site you have made will be re-written to be more accomodating to the world at large.
Click on Lesson 9 to continue, or click here (Top) to return to the top of document