website marketing

   

Hosting
Domain Names
Search
Bookmark!
Home | Forum | Resources | Contact | FAQ | Templates | Generators | Affiliates | Shareware | Scripts | CMS Tools | Articles
XML RSS Feeds

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>I hope you're doing fine. I REALLY miss you. I am doing fine. 

<p>I'm just about finished with my computer course. The instructor said I have a good chance at getting a job with IBM since they hire from our graduating class, and I am the top student.

<p>Well, it's time for class now . . . but I just wanted to say I love you.

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

And would look like this:


Mom and Dad,

I hope you're doing fine.  I REALLY miss you. I am doing fine.

I'm just about finished with my computer course. The instructor said I have a good chance at getting a job with IBM since they hire from our graduating class, and I am the top student.

Well, it's time for class now . . . but I just wanted to say I love you.

Your loving child,
Darla


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

Subscribe to our bi-monthly Tips

Name:
Email:

NewbieHangout Graphics Logo

NOTE: Use of this Web Site or any Content or Services herein constitutes acceptance of the Conditions of Use and our Privacy Policy. ALL CONTENT Copyright © 2001-2004 NewbieHangout.com. World rights reserved. All material is subject to a liberal Creative Commons License. Please follow the guidelines and give credit where credit is due.