tt (HTML element)

Spec
Depr. Empty Version
No No HTML 2
Browser support (more…)
IE5.5+ FF1+ SA1.3+ OP9.2+ CH2+
Full Full Full Full Full

Syntax

<tt>
</tt>

Description

Much like the b and i elements, tt provides no semantic information about the text it encloses—it is purely used for text formatting purposes. tt is short for teletype, and instructs the browser to render the text similarly to that produced by old-style teletype machines, which is understood to be a fixed-width (monospace) font. Most browsers will render tt content in Courier typeface.

Example

You might use tt to describe the output from an archaic sports scores system:

<p>The scores rolled in underneath the moustached face of Dickie
    Davies, hot off the teletype machines that someone was operating
    deep in the dungeons of ITV: &quot;<tt>Heart of Midlothian: 4,
    Queen of the South: 2, Plymouth Argyle 3 …</tt>&quot;</p>

Use This For …

It’s best not to use this element at all! While you may have text content that needs fixed width formatting, you’d be well advised to define a class in your CSS file, and style it using a monospace font.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
5.5 6.0 7.0 8.0 1.0 1.5 2.0 3.0 3.5 1.3 2.0 3.1 4.0 9.2 9.5 10.0 2.0
Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full Full

The tt element has good browser support: all the major browsers render it in a fixed-width font, which is usually Courier.

User-contributed notes

There are no comments yet.

Related Products