HTML <tt> tag

Updated: 11/13/2018 by Computer Hope
HTML tt tag

When writing in HTML, the <tt> tag was used to designate inline teletype text. It was intended to style text as it would appear on a fixed-width display, using the browser's default monotype font. The following sections contain information about this tag, including an example of it in use, as well as related attributes and browser compatibility.


This tag is deprecated. Going forward, the <code> tag should be used instead.

Example of <tt> code

<p>Some normal text. <tt>Some teletype text.</tt></p>

Example result

Some normal text. Some teletype text.


Within an HTML tag, an attribute dictates certain aspects of an HTML element. Attributes are made up of a name and value pair. While the <tt> tag does not have any unique attributes, it does utilize all of the standard attributes.


Edge Internet Explorer Firefox Safari Opera Chrome
All versions * All versions * All versions * All versions * All versions * All versions *

*Until it is removed in a future version of HTML

Browser, Compatibility, Font, HTML kbd tag, HTML var tag, Inline, Web design terms