HTML Formatting

Please Share On:

12) <sup> – Superscript Text

The <sup> element has opening and closing tag. <sup> … </sup>. Any texts that appears between opening <sup> tag and closing </sup> tag is shown in above the normal line and rendered in a smaller font.

The HTML <sup> element defines superscript text.

Syntax:

<sup> ... </sup>

Code:

<!DOCTYPE html>
<html>
  <head>
    <title>Sup Text</title>
  </head>
 
  <body>
    <p> This is a normal text.</p> 
    <p> This is a <sup> superscripted </sup> text.</p>
    <p>
      The good example of using superscripted text is in dates. 
      For example: 12<sup>th</sup>, Feb 2022.
    </p>
  </body>
</html>  

Output:

13) <strike> – Strike Text

The <strike> element has opening and closing tag. <strike> … </strike>. Any texts that appears between opening <strike> tag and closing </strike> tag is shown in strike text.

Syntax:

<strike> ... </strike>

Code:

<!DOCTYPE html>
<html>
  <head>
    <title>Strike Text</title>
  </head>
 
  <body>
    <p> This is a normal text.</p> 
    <p> This is a <strike> strike </strike> text.</p>
  </body>
</html>

Output:

14) <tt> – Monospaced Font

The <tt> element has opening and closing tag. <tt> … </tt>. Any texts that appears between opening <tt> tag and closing </tt> tag is shown in monospaced font.

Syntax:

<tt> ... </tt>

Code:

<!DOCTYPE html>
<html>
  <head>
    <title>Monospaced Text</title>
  </head>
 
  <body>
    <p> This is a normal text.</p> 
    <p> This is a <tt> monospaced </tt> text.</p>
  </body>
</html>

Output:



You may be interested in the following topics:

Leave a Reply

Your email address will not be published. Required fields are marked *

Copyright @2023. All Right Reserved.


Social media & sharing icons powered by UltimatelySocial