Pages

Wednesday, January 19, 2011

Teletype Element

The teletype element is used to display text in a mono-space typeface font. The teletype element has a distinct advantage over the Preformatted Element (that many people use to get mono-spaced fonts), because it doesn't affect the formatting of the text. Most font style tags are rendered by the browser in a specific style. But it’s recommended that you use CSS if you need to style text in that form. The teletype element is good to use in a question and answer type document.

Listed below are the most common attributes you can use for the teletype element:
  • class - provides the class or classes of the heading. This attribute is used to identify the name of the style class or classes to be used for rendering.
  • id - provides a unique name for the heading.
  • lang - provides the language in which the enclosed content is coded.
  • style - provides a cascading style sheet (CSS) properties to the heading.
  • title - privides a text title for the heading. Most web browser displays the value of the title as "tooltip". 

Here's an example on how to use the teletype <tt> element:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
         <meta http-equiv="Content-Type" content="text/html;
charset=utf-8" />
         <mate name="keywords" content="blog, web development" />
         <title>the TELETYPE element</title>
     </head>

     <body>
       <h1>
         the TELETYPE element
       </h1>
          An article from the Wall Street says:<br />
       <p>
            Q: I Am a Macintosh user and plan to buy a new Dell with Windows Vista. How can i move my programs and files from the old MAC to the new Dell?
       </p>
       <tt>
           A: You can't switch Mac programs to the Dell. They won't run on Windows. But nearly all common files used on Mac, like Microsoft office documents, text files, pictures and songs, will work.
       </tt>
  </body>
</html>

0 comments:

Post a Comment