<tt>


HTML <tt> Tags - HTML5 Not supported

##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

1000.png ##All major browsers support the <tt> tag.

Tag definition and usage instructions

HTML5 does not support the <tt> t tag. Please use CSS instead.

<tt> Tag defines typewriter text.

Tips and Notes

Tips:

Use CSS to specify the type of text in the document.

Differences between HTML 4.01 and HTML5

HTML5 does not support the <tt> tag. HTML 4.01 supports the <tt> tag.

Standard attributes

In HTML 4.01, the <tt> tag supports the following standard attributes:

Attributesclassclassnamedir ltrididlanglanguage_codestylestyle_definitiontitletext xml:langlanguage_code

For a complete description, please visit the standard properties.


Event attributes

In HTML 4.01, the <tt> tag supports the following event attributes:

ValueDescription
Specifies the class name of the element
rtl
Specifies the text direction of the content in the element
Specifies the uniqueness of the element id
Specifies the language code of the content in the element
Specifies the inline style of the element
Specifies additional information for the element
Specifies XHTML The language code of the content in the document element
## onkeypressExecute script when the keyboard is pressed and then releasedonkeyupExecute script when the keyboard is released
AttributesValueDescription
onclickscriptWhen the mouse is clicked Execute script
ondblclickscriptExecute script when the mouse is double-clicked
onmousedownscriptExecute script when mouse button is pressed
onmousemovescriptExecute script when mouse pointer moves
onmouseoutscript Execute the script when the mouse pointer moves out of an element
onmouseoverscriptWhen the mouse pointer hovers over Execute the script when on an element
onmouseupscriptExecute the script when the mouse button is released
onkeydownscriptExecute script when the keyboard is pressed
#script
script
For a complete description, please visit the event properties.