Help Index |
![]() Preformatted Text Preformatted text differs from regular text in two important ways: 1. It will appear in a monospaced, or fixed-width font (making it look typewritten), and 2. it will appear in the browser window exactly as you typed it, including carriage returns and spaces.
<pre> turns on preformatted text </pre> turns off preformatted textThe following text is surrounded by the <PRE></PRE> tag set. <pre>Dear Mom, Would it be okay with you if I didn't come over today so I could clean my ... house?</pre> And the display will look like this: Dear Mom, Would it be okay with you if I didn't come over today so I could clean my ... house? Preformatted text is best used when displaying code, ASCII art, poetry, or anything else in which line returns and spaces are intentional. Remember, you must hit return on each line, or the text will trail off the browser window. (Anyhow, you should probably tell mom what you really want to do!) Now, let's take a look at the above example again, but take it out of <pre>: <p>Dear Mom, Would it be okay with you if I didn't come over today so I could clean my ... house? It would display like this:
The line returns and spaces are ignored or downplayed in regular HTML. Be careful with preformatted text, (in some browsers, it takes away lists and headlines), but it can be combined with other tags. You can make it bold or italic, for instance, and you can also build links into it, as shown below: If your HTML reads like this: <pre>I wonder if mom really b e l i e v e s <b>me!!</b> Maybe <a href="mailto:surfer@websurfer.com">I</a> should tell <i>her</i> the truth.</pre> It will display like this: I wonder if mom really b e l i e v e s me!! Maybe I should tell her the truth. Return to Help Index
Publicize | Color Chart | Gadgets | Rings 'n Things | Awards | Personal Help | |