HTML <tt> tag

Updated: 04/26/2017 by Computer Hope

HTML tt tagWhen 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.

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

Example code

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

Example result

Some normal text. Some teletype text.

Attributes

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.

Compatibility

Internet Explorer Firefox Safari Opera Chrome
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