Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

HTML <tt> tags


May 05, 2021 HTML Reference Manual


Table of contents


HTML slt;tt> Tags - HTML5 does not support

The label is used to change the font style so that the text in the label appears as typewriter text, please refer to the following example:

Define typewriter text:

<p><tt>Teletype text</tt></p>

Try it out . . .

Browser support

HTML <tt> tags HTML <tt> tags HTML <tt> tags HTML <tt> tags HTML <tt> tags

All major browsers support the hashtag.


Label definition and instructions for use

HTML5 does not support the label. Use CSS instead.

Labels define typewriter text.


Tips and comments

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


The difference between HTML 4.01 and HTML5

HTML5 does not support labeling. HTML 4.01 supports the label.


The standard property

In HTML 4.01, the label supports the following standard properties:

Attributes value describe
class classname The name of the specified element
dir rtl
ltr
Specify the text direction of the content in the elements
id id Unique ID of the specified element
lang language_code Specify language code in the contents of the elements
style style_definition Introduction to the elements
title text Additional information of the specified elements
xml:lang language_code Specify the language code of the content in the XHTML document element

For a complete description, visit Standard Properties.


The event property

In HTML 4.01, the tag supports the following event properties:

Attributes value describe
onclick script Perform a script when the mouse is clicked
ondblclick script When the mouse is double-bit, execute the script
onmousedown script When the mouse button is pressed, execute the script
onmousemove script Execute a script when the mouse pointer moves
onmouseout script Execute a script when the mouse pointer is moved out of an element
onmouseover script Execute the script when the mouse pointer hovers over a certain element
onmouseup script Perform a script when the mouse button is released
onkeydown script Perform a script when the keyboard is pressed
onkeypress script When the keyboard is pressed, execute the script when it is released.
onkeyup script When the keyboard is released, the script is executed.

For a complete description, visit Event Properties.