Much like the
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.
You might use
to describe the output from an archaic sports scores
<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: "<tt>Heart of Midlothian: 4, Queen of the South: 2, Plymouth Argyle 3 …</tt>"</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.
tt element has good browser support: all the major
browsers render it in a fixed-width font, which is usually