Help Index

Back to
geocities

html
Teletype

The teletype tag creates typewriter-style text, set in a fixed-width font. The more popular <pre> tag also creates typewriter-style text. But there are some major differences between the two.

<tt> opens teletype
</tt> ends teletype

Preformatted text is just that - preformatted; the line breaks are determined by hard returns (hitting the return key). If you don't indicate line breaks, you won't get any. The preformatted text will just trail off the right-hand side of the page. Teletype, however, is treated like normal text. It can accommodate formatting tags, like <p> and <br>, and will automatically wrap, in accordance with the width of the browser window.

The HTML for teletype would look something like this:

<tt>Mom and Dad,

<p>How are the both of you? I am doing fine. After the police left last Saturday, I was able to board up the broken window and get some sleep.

<p>Could you send me some warm blankets? The firemen soaked mine and it's real cold without the heat on. Oh, I didn't mention the heat?

<p>Your loving child,<br>
Brandon </tt>

And would look like this:

Mom and Dad,

How are the both of you? I am doing fine. After the police left last Saturday, I was able to board up the broken window and get some sleep.

Could you send me some warm blankets? The firemen soaked mine and it's real cold without the heat on. Oh, I didn't mention the heat?

Your loving child,
Brandon

Since teletype is treated like normal text, it can be modified by other font tags or placed into a line of normal text without being pushed onto a new line.

So if your HTML looked like this:

<p>My programs used to say <tt>"Goodmorning, boss!"</tt> Now they say <tt>"You again?"</tt>
Your page would look like this:
My programs used to say "Goodmorning boss!" Now they say "You again?"

So, basically, teletype is much like preformatted text, but with less hassle. You'll still want to use preformatted text when you honestly need to format the text. But if you're just looking for that retro-typewriter look, teletype would be my choice.

Return to Help Index

mailbox ksv@earthling.net

Top | Home | Contents | Tutorials | On-Line Classes | Free Homepage | Graphics |
Publicize | Color Chart | Gadgets | Rings 'n Things | Awards |
Personal Help |