IPOWERWEB.com

 Affordable, reliable
web hosting solutions

Call IPOWERWEB Today at 1-888-511-HOST Chat with an IPOWERWEB representative LIVE!
24/7x365 service - Live Technical Support

Domain Name Registration
web hosting services
cheap web hosting
IPOWERWEB help section
contact IPOWERWEB
testimonials for best hosting
affordable web hosting
IPOWERWEB web hosting
IPOWERWEB accolades
best domain prices


Web Hosting Money Back Guarantee
home build profit promote manage


Basic HTML Tutorial: Preformatted Text

Home > Build > Programming > HTML > Basic HTML Tutorial

1.17 Preformatted Text

We mentioned recently that browser's ignored extra spaces and all carriages. That isn't entirely true. There is a way to use Preformatted text, where the browser will interpret the text as you format it in the text editor. This would be a nice way to format text, but the one problem is that all preformatted text is displayed in a monospace font, such as Courier. Monospace fonts are not very attractive, and it would be considered bad design in many cases.

There are some situations where preformatted text could come in handy. For example, a company chart. Or data that doesn't necessarily need to be dressed up.

Preformatted text is also a good way to import text from another document such as Microsoft Word. If a Word document is pasted into a text editor, everything will display as one block. If the word document is pasted within the <PRE> container, most of the formatting will stay intact.

Preformatted text is turned on with the <PRE> tag and turned off with the </PRE>. Everything in between is displayed as formatted in the editor.

Here is an example:

<HTML>
<HEAD>
<TITLE>Preformatted text</TITLE>
</HEAD>
<BODY>
<PRE>


   # of Pork and Beans in stock

   ----------------------------



      Pork   Beans   Total

5/1     1      2       3

5/2     2      5       7




</PRE>
</BODY>
</HTML>

See it in the Browser:

1.18 Special Characters

 
home | products | about us | help center | testimonials | press room | contact us
affiliates | careers | domain names | web hosting | site map

Copyright © 1999-2007 IPOWER, Inc. Read our Terms and Conditions. All rights reserved.