Learn HTML Code Tutorial Reference Guide

<PRE ...>

Usage Recommendation
thumbs up use it

<PRE ...> is one the handiest tags in the HTML toolbox. <PRE ...> marks the text as "preformatted" -- all the spaces and carriage returns are rendered exactly as you type them.

<PRE>
             title            extension
Raha         Producer         8765
Kathy        Accountant       8924
Scarlett     Security Guard   8273
</PRE>

produces

             title            extension
Raha         Producer         8765
Kathy        Accountant       8924
Scarlett     Security Guard   8273

<PRE ...> text is rendered in a fixed width font, meaning that all characters and spaces are the same width. Fixed width makes it easy to lay out the text just the way you want it, so <PRE ...> is great for creating "quick and dirty" tables like the one above.

<PRE ...> does NOT cause the browser to ignore tags. You can still create links and other goodies:

<PRE>
             title             extension
<A HREF="raha.html"    >Raha</A>         Producer          8765
<A HREF="kathy.html"   >Kathy</A>        Accountant        8924
<A HREF="scarlett.html">Scarlett</A>     Security Guard    8273
</PRE>

produces

             title             extension
Raha         Producer          8765
Kathy        Accountant        8924
Scarlett     Security Guard    8273

When you start adding markup, it gets harder to see how the text turns out (spacing your tags out evenly like the table above helps). <PRE ...> is often used to quote large blocks of text that you don't want to "HTMLize", but a < or > could mess up the text. For a table larger than a few lines, it is usually easier in the long run to use table code.




 

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   Privacy Policy   |   About
Copyright ©1997-2002 Idocs and ©2002-2014 HTML Code Tutorial