Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

How To Guides
Virtualization
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Windows
Problem Solutions
Privacy Policy

  




 

 

<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.

 
 
  Copyright 1997-2002 Idocs inc. Published under the terms of the Open Content License Design by Interspire