Open In App

What are various tags available to add special meaning to the text in HTML ?

Last Updated : 02 Feb, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

In this article, we will discuss the tags that will add special meaning to the text in HTML.

HTML <b> and <strong> Tags: Both tags are used to make the text bold. The text content of the tag is shown as important information on the webpage.

Syntax:

<b> ... </b>
<strong> ... </strong>

Example: Using the code below, this example will demonstrate how to use the <b> and <strong> tags.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Bold and strong</title>
</head>
  
<body>
    <!--Normal text-->
    <p>Normal Text</p>
  
  
    <!--Text in Bold-->
    <p><b>Bold Text</b></p>
  
  
    <!--Text in Strong-->
    <p><strong> Strong Text</strong></p>
  
</body>
  
</html>


Output:

HTML <i> and <em> Tags: Both tags are used to make the text italic and emphasized. Both the element have opening and closing tags.

Syntax:

<i> ... </i>
<em> ... </em>

Example: Using the code below, this example will demonstrate how to use the <i> and <em> tags.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Italic and emphasized</title>
</head>
  
<body>
    <!--Normal text-->
    <p>Normal Text</p>
  
  
    <!--Text in Italics-->
    <p><i>The Text inside italic Tag</i></p>
  
  
    <!--Text in Emphasize-->
    <p><em>Emphasized Text</em></p>
  
</body>
  
</html>


Output:

HTML <small> and <big> Tags: The <small> tag is used to set small font-size where as <big> tag is used to set big font-size.

Syntax:

<small> ... </small>
<big> ... </big>

Example: Using the code below, this example will demonstrate how to use the <small> and <big> tags.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Small and Big</title>
</head>
  
<body>
    <!--Text in Normal-->
    <p>Normal text</p>
  
    <small>The text inside small Tag</small>
  
    <p>
        <big>The text inside big Tag</big>
    </p>
  
</body>
  
</html>


Output:

HTML <sup> and <sub> Tags: The <sup> tag is used to superscript a text whereas <sub> tag is used to subscript a text.

Syntax:

<sup> ... </sup>
<sub> ... </sub>

Example: Using the code below, this example will demonstrate how to use the <sup> and <sub> tags.

HTML




<!DOCTYPE html>
<html>
  
<head>
    <title>Superscript and Subscript</title>
</head>
  
<body>
  
    <!--Text in Normal-->
    <p>Normal Text
      
    <!--Text in Superscript-->
    <p>
        <sup>superscript </sup> Text
    </p>
  
  
    <!--Text in Subscript-->
    <p>
        <sub>subscript</sub>Text
    </p>
  
</body>
  
</html>


Output:



Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads