HTML <tt> Tag

The <tt> tag is the abbreviation of teletype text & is used to define the teletype-type text in HTML 4, but now depreciated from HTML5. We can achieve this with the help of semantic elements, like <kbd>, <var>, <code>, and <samp>, or we can use the various CSS for styling.

Syntax

<tt> Content... </tt>

Example: The below example illustrates the <tt> tag in HTML.

HTML




<html>
  
<body>
    <h1> w3wiki</h1>
    <h2>tt Tag</h2>
  
    <!-- HTML tt Tag is used here-->
    <tt>
        GfG stands for w3wiki
    </tt>
  
    <p>
        <tt>
            It is a computer science
            portal for Beginner
        </tt>
    </p>
</body>
  
</html>


Output: 

Supported Browsers

  • Google Chrome 1 and above
  • Edge 12 and above
  • Firefox 1 and above
  • Opera 15 and above
  • Safari 4 and above

Contact Us