This is an important message requiring you to make a choice if you're based in the EU.

HTML <tt> Tag

The <tt> tag defines text to be displayed in monospace or fixed-width font as it would appear on a teletype or typewriter.

The <tt> tag is obsolete in HTML 5.

Instead of the <tt> tag use CSS font-family property or appropriate HTML elements: the <kbd> element for keyboard input; the <var> tag for variables; the <code> tag for computer code; and the <samp> element for computer output.


The <tt> tag comes in pairs. The content is written between opening (<tt>) and closing (</tt> ) tags.


<!DOCTYPE html>
    <title>Title of the document</title>
    <p>This is an ordinary text.</p>
    <p style="font-family: monospace">And this is a teletype text.</p>



The <tt> tag supports the Global Attributes.

Browser support

Do you find this helpful?

Related articles