HTML Formatting with Examples

HTML Formatting elements are used to change the appearance of the text and for making editorial addition and deletion of the content on the webpage. Let us understand HTML Formatting in detail.

HTML Formatting features

  •  Formatting Tags are used to make  HTML content look Bold and Strong.
  • There are several types of Formatting tags that are used in HTML without using CSS.
  • Formatting Tags are used to change and present the HTML text.
  • Formatting tags are not case sensitive.
  • Formatting Tags are of two types logical and physical.

Example of HTML formatting Tag 

There are many different types of HTML Formatting depend on the option available for the element. for eg :

Eg.1 Strong Formatting Tag

!DOCTYPE html>
<html>
  <head>
    <title>welcome to codedec</title>
  </head>
  <body>
    <p> <strong> BOLD text</strong>.</p>
    <p> <b>happy learning</b>.</p>
  </body>
</html>

   Output :   

Eg.2 Italic Formatting Tag

<!DOCTYPE html> 
<html> 
<head> 
  <title>Italic</title> 
</head> 
<body> 
  <!--Normal text-->
  <p>CODEDEC PROGRAM</p> 
  <!--Text in Italics-->
  <p><em>CODEDEC PROGRAM</em></p> 
</body> 
</html>

    Output :

Eg.3 Mark Formatting Tag

<!DOCTYPE html>
<html>
  <head>
    <title>CODEDEC WEBSITE</title>
  </head>
  <body>
    <p>lEARN PROGRAMMING ON <mark>https://codedec.com/</mark>.</p>
  </body>
</html>

   Output :

Eg.4  Small Formatting Tag

<!DOCTYPE html>
<html>
<body>

<p>normal word.</p>
<p><small> smaller word.</small></p>

</body>
</html>

 Output :

 Eg.5  Small Formatting Tag

<!DOCTYPE html>
<html>
<body>

<p>My black is the coolest color <del>black</del> red.</p>

</body>
</html>

 Output