Teletype Element Tutorial
<tt>
Introductory Text
The tt element renders teletype or monospaced text.
[Note: This presentation element was developed before CSS; HTML 4.01 has not deprecated it but suggests style sheet usage; it has been obsoleted in HTML 5.]
- Start tag:
<tt>- End tag:
</tt>
Use Examples
- Example:
-
`Twas brillig, and the slithy toves did gyre and gimble in the wabe: all mimsy were the borogoves, and the mome raths outgrabe.
- Code [HTML]:
-
<p><tt>`Twas brillig, and the slithy toves did gyre and gimble in the wabe: all » mimsy were the borogoves, and the mome raths outgrabe.</tt></p>
- Example [CSS]:
-
This text has been set in monospace with CSS use.
- Code [HTML]:
-
<p class="teletype">This text has been set in monospace with <abbr>CSS</abbr> use.</p> - Code [CSS]:
-
.teletype { font: 80% monospace, Courier, "MS Courier New", "Everson Mono"; }
Content Model/Assigned Attributes
- Element-Type:
- Text-Level
- Attributes:
</tt>
