Skip to main content

HTML Guide

The “tt” element is obsolete. Use CSS instead.

The <tt> tag, used in HTML4 to apply a monospaced (fixed width) font to the text, was deprecated in HTML5. Instead, you should use CSS to apply the desired font.

Example, instead of this deprecated code:

<tt>This is deprecated</tt>

You can define a monospaced text using font-family:

<span style="font-family: monospace;">This is monospaced text</span>

Learn more:

Related W3C validator issues