tt HTML

HTML <tt> Tag

The HTML <tt> tag is not supported in HTML5. It was earlier used to specify a particular text in a monospaced font or fixed-width font. It thus displays the text on the browser as a teletype, text-only screen, or line printer.

The below tags can be used in HTML5 instead of the <tt> tag:

Tag Uses
<code> To specify a piece of computer code.
<samp> To specify a sample output from a computer program.
<kbd> To specify a keyboard input.
<var> To specify a variable.

Example:

<!DOCTYPE html>
<html>
<body>
<p>HELLO WORLD!!</p>
<p><tt>HELLO WORLD!!</tt></p>
</body>
</html>

Explanation:


In the above example, we have displayed the use of the HTML <tt> tag.

Supporting Browser:

Chrome, IE, Firefox, Opera, and Safari.

Please follow and like us:
Content Protection by DMCA.com