HTML Tt Tag <tt> is used to define teletype text in any HTML Resource or webpage.
HTML Tt tag <tt> is not supported in HTML 5 but is supported in HTML 4.01.
Syntax of HTML Tt Tag
<tt> Some text here.. </tt>
Example of HTML Tt Tag
| HTML Tt Tag Code | Output | ||||
|
This text is normal. This text is in teletype. |
In the example of HTML Tt Tag output above, we can see that the “This text is in teletype” is being displayed in a different font because we have wrapped it in HTML Tt Tag.
HTML Tt Tag Supported Global attributes (in HTML 4.0.1)
| HTML Strike Tag Attribute Name | Value | Description |
| Class | classname | Indicates a classname for the tag |
| Dir | rtl, ltr | Indicates the text direction: right to left (rtl) and left to right (ltr). |
| Id | id | Defines a unique id for the tag |
| Lang | language_code | Indicates the language code for the language contained within the tag |
| Style | style_definition | Indicates an inline style for the tag |
| Title | text | Defines additional information about the tag |
| Xml:lang | Language_code | Indicates the language code for the language contained within the tag in XHTML. |
See all HTML Global Attributes.
HTML Tt Tag supported Event Attributes (In HTML 4.0.1)
| HTML Strike Tag Event Attributes | Value | Description |
| onclick | Script/code | Script/code to be executed on mouse click |
| ondbclick | Script/code | Script/code to be executed on mouse double click |
| onmousedown | Script/code | Script/code to be executed on mouse button is pressed |
| onmousemove | Script/code | Script/code to be executed on mouse pointer moves |
| onmouseout | Script/code | Script/code to be executed on mouse pointer moves out of the target element |
| onmouseover | Script/code | Script/code to be executed on mouse pointer moves over the target element |
| onmouseup | Script/code | Script/code to be executed on mouse button is released |
| onkeydown | Script/code | Script/code to be executed on key press |
| onkeypress | Script/code | Script/code to be executed on key pressed and then released |
| onkeyup | Script/code | Script/code to be executed on key is released |
See all HTML Event Attributes.
HTML Tt Tag Supporting Browsers
| S. No. | Browser | Supported(Yes/No) |
| 1 | Internet Explorer | Yes |
| 2 | Firefox | Yes |
| 3 | Google Chrome | Yes |
| 4 | Opera | Yes |
| 5 | Safari | Yes |