Learnerslesson
   JAVA   
  SPRING  
  SPRINGBOOT  
 HIBERNATE 
  HADOOP  
   HIVE   
   ALGORITHMS   
   PYTHON   
   GO   
   KOTLIN   
   C#   
   RUBY   
   C++   
   HTML   
   CSS   
   JAVA SCRIPT   
   JQUERY   




HTML - Formatting


Have you ever used MS Word?


It actually gives you an option to make a text look bold or italics or even if you want to strike through a text, you can do that.


And if we want to achieve the same in HTML, how can we do that?


Well! This is where we come across one of the cool topic in HTML. That is Formatting.


What is Formatting in HTML?


As said earlier, formatting is a feature in HTML where we can make a text bold, italics, small e.t.c.


Let us see all the Formatting elements in HTML :

  1. <b>


    This tag is used to make the text bold.
  2. <i>


    This tag is used to make the text italic.
  3. <strong>


    This tag is used to tell the browser that its an important text.
  4. <u>


    This tag is used to underline a text.
  5. <mark>


    This tag is used to tell the browser that its a marked text.
  6. <small>


    This tag is used to make the text smaller.
  7. <big>


    This tag is used to make the text bigger.
  8. <em>


    This tag is used to make the text italic.
  9. <sup>


    This tag is used to make the text a Superscript text.
  10. <sub>


    This tag is used to make the text a Subscript text.
  11. <ins>


    This tag is used to make the text an inserted text.
  12. <del>


    This tag is used to display a Deleted text.
  13. <strike>


    This tag is used to strike through a text.

Now, let us see the detail use of the Formatting elements in HTML :

  1. <b>


    This tag is used to make the text bold.

    Example :



    <html>
    <body>
    	<b>This is a bold text</b>
    </body>
    </html>
    


    Output :




  2. <i>


    This tag is used to make the text italic.

    Example :



    <html>
    <body>
    	<i>This is an italic text</i>
    </body>
    </html>
    


    Output :




  3. <strong>


    This tag is used to tell the browser that its an important text.

    Example :



    <html>
    <body>
    	<strong>This is a strong text</strong>
    </body>
    </html>
    


    Output :




  4. <u>


    This tag is used to underline a text.

    Example :



    <html>
    <body>
    	<u>This is an underlined text</u>
    </body>
    </html>
    


    Output :




  5. <mark>


    This tag is used to tell the browser that its a marked text.

    Example :



    <html>
    <body>
    	<mark>This is a marked text</mark>
    </body>
    </html>
    


    Output :




  6. <small>


    This tag is used to make the text smaller.

    Example :



    <html>
    <body>
    	<small>This is a small text</small>
    </body>
    </html>
    


    Output :




  7. <big>


    This tag is used to make the text bigger.

    Example :



    <html>
    <body>
    	<big>This is a big text</big>
    </body>
    </html>
    


    Output :




  8. <em>


    This tag is used to make the text italic.

    Example :



    <html>
    <body>
    	<em>This is a big text</em>
    </body>
    </html>
    


    Output :




  9. <sup>


    This tag is used to make the text a Superscript text.

    Example :



    <html>
    <body>
    	This is a normal text. <sup>This is a superscript text</sup>
    </body>
    </html>
    


    Output :




  10. <sub>


    This tag is used to make the text a Subscript text.

    Example :



    <html>
    <body>
    	This is a normal text. <sub>This is a subscript text</sub>
    </body>
    </html>
    


    Output :




  11. <ins>


    This tag is used to make the text an inserted text.

    Example :



    <html>
    <body>
    	This is a normal text. <ins>This is a inserted text</ins>
    </body>
    </html>
    


    Output :




  12. <del>


    This tag is used to display a Deleted text.

    Example :



    <html>
    <body>
    	This is a normal text. <del>This is a deleted text</del>
    </body>
    </html>
    


    Output :




  13. <strike>


    This tag is used to strike through a text.

    Example :



    <html>
    <body>
    	This is a normal text. <strike>This is a strik through text</strike>
    </body>
    </html>
    


    Output :