1. Home
  2. Computing & Technology
  3. Web Design / HTML

<tt></tt>

By , About.com Guide

<tt> Description:

The <tt> element creates teletype or monospaced fonts of the enclosed text.

<tt> Web Browser Support:
<tt> Attributes:
<tt> End Tag:
</tt> REQUIRED
Contents:

CDATA Usually plain text. The following tags are valid within the <tt> tag:
a, abbr, acronym, applet, b, basefont, bdo, big, br, button, cite, code, dfn, em, font, i, iframe, img, input, kbd, label, map, object, q, s, samp, script, select, small, span, strike, strong, sub, sup, textarea, tt, u, var

<tt> Valid Context:

The <tt> tag is valid within the following tags:
a, acronym, address, applet, b, bdo, big, blockquote, body, button, caption, center, cite, code, dd, del, dfn, div, dt, em, fieldset, font, form, h1, h2, h3, h4, h5, h6, i, iframe, ins, kbd, label, legend, li, noframes, noscript, object, p, pre, q, s, samp, small, span, strike, strong, sub, sup, td, th, tt, u, var

<tt> Usage:
  • standard tt text
    <tt>Compare teletype text</tt> to non-teletype text.
<tt> Special Notes:
  • Use the teletype tag when you want a monospaced font.
  • Do not use it for text that represents computer code - use the <code> tag.
  • This tag has a distinct advantage over the <pre> tag (that many people use to get monospaced fonts), because it doesn't affect the formatting of the text.
More <tt> Information:

Return to XHTML Element (HTML Tags) Library

About.com Special Features

The Best Web Trends of the Decade

A look back at the best innovations, ideas and technologies over the last 10 years, More >

Family Tech Center

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >