CodesJava

Easy learning with example program codes

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 fonts. 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:

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

Output:

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:
error
Posted in HTML   









Copyright © 2019 CodesJava DMCA.com Protection Status