<tt>
HTML <tt> Tags - HTML5 Not supported
##Instance
Run instance»Click the "Run instance" button to view the online instance
<!DOCTYPE html> <html> <body> <p>This text is normal.</p> <p><tt>This text is teletype text.</tt></p> </body> </html>
Run instance»Click the "Run instance" button to view the online instance
Browser support
##All major browsers support the <tt> tag.
Tag definition and usage instructionsHTML5 does not support the <tt> t tag. Please use CSS instead.
<tt> Tag defines typewriter text.
Tips and NotesTips:
Use CSS to specify the type of text in the document.
Differences between HTML 4.01 and HTML5HTML5 does not support the <tt> tag. HTML 4.01 supports the <tt> tag.
Standard attributesIn HTML 4.01, the <tt> tag supports the following standard attributes:
Value | Description | |
---|---|---|
classname | Specifies the class name of the element | |
rtl | ltrSpecifies the text direction of the content in the element | |
id | Specifies the uniqueness of the element id | |
language_code | Specifies the language code of the content in the element | |
style_definition | Specifies the inline style of the element | |
text | Specifies additional information for the element | |
language_code | Specifies XHTML The language code of the content in the document element |
Attributes | Value | Description |
---|---|---|
onclick | script | When the mouse is clicked Execute script |
ondblclick | script | Execute script when the mouse is double-clicked |
onmousedown | script | Execute script when mouse button is pressed |
onmousemove | script | Execute script when mouse pointer moves |
onmouseout | script | Execute the script when the mouse pointer moves out of an element |
onmouseover | script | When the mouse pointer hovers over Execute the script when on an element |
onmouseup | script | Execute the script when the mouse button is released |
onkeydown | script | Execute script when the keyboard is pressed |
#script | Execute script when the keyboard is pressed and then released||
script | Execute script when the keyboard is released