HTML Formatting

Please Share On:

When you write content, you need some text to look more special than other text like bold, italic, underlining, and so on. This element for defining text with special meaning is HTML formatting.

HTML Formatting Elements:

Below are the list of HTML formatting elements:

  1. <b> – Bold Text
  2. <i> – Italic Text
  3. <strong> – Important Text
  4. <u> – Underline Text
  5. <em> – Emphasized Text
  6. <mark> – Marked Text
  7. <small> – Smaller Text
  8. <big> – Larger Text
  9. <del> – Deleted Text
  10. <ins> – Inserted Text
  11. <sub> – Subscript Text
  12. <sup> – Superscript Text
  13. <strike> – Strike Text
  14. <tt> – Monospaced Font

1) <b> – Bold Text

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

Syntax:

<b> ... </b>

Code:

<!DOCTYPE html>
<html>
  <head>
    <title>Bold Text</title>
  </head>
 
  <body>
     <p> This is a first line without using bold element. </p>
    <br/>
    <p>
      This is a <b>second line</b> with using <b>bold element.</b>
    </p>
    
  </body>
</html> 

Output:

2) <i> – Italic Text

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

Syntax:

<i> ... </i>

Code:

<!DOCTYPE html>
<html>
  <head>
    <title>Italic Text</title>
  </head>
 
  <body>
    <p>
      This is a <i>line</i> using <i>italic element.</i>
    </p>  
  </body>
</html> 		
                    

Output:

Continue Reading on the next page

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