HTML Formatting


❮ Previous Next ❯

What is an HTML Formatting?

HTML formatting tags are used to define the style of text in a web page which shows special meaning of text.


Different types of HTML Formatting tags :

  • <b> : Bold Text
  • <i> : Italic Text
  • <u> : Underline Text
  • <strong> : Bold & Important Text
  • <sub> : Subscript Text
  • <sup> : Superscript Text
  • <em> : Emphasized Text
  • <mark> : Marked Text
  • <small> : Small Text
  • <del> : Delete Text
  • <ins> : Inserted Text

Difference between HTML <b> & <strong> tags

The HTML <b> tag is used to display text in bold.

The HTML <strong> tag defines the text is important, the text is typically displayed in bold.

Example

<b>This is a bold text.</b>
<strong> This is important text, display same as bold</strong>
Try It »

Difference between HTML <i> & <em> tags

The HTML <i> tag is used to display text in italic.

The HTML <em> tag defines the text is important and has some meaning, the text is typically displayed in italic.

Example

<i>This is a italic text.</i>
<em> This is important text, display same as itatlic</em>
Try It »

Difference between HTML <sup> & <sub> tags

The HTML <sub> element is used to define subscripted text in a web page. Subscripted text appears slightly lower than the normal text and is often used to represent a subscript in scientific or mathematical expressions.

The HTML <sup> element is used to define superscripted text in a web page. Superscripted text appears slightly higher than the normal text and is often used to represent a superscript in scientific or mathematical expressions.

Example

<p>Water formula is H<sub>2</sub>O</p>
<p> Formula for Area of Circle A = πr<sup>2</sup>.</p>
Try It »

Others HTML Formatting Tags

Example

<small>This is a Small Text.</small>
<p>HTML is a <mark>Hypertext Markup Language.</mark></p>
<p>I love the <del>green</del> color.</p>
<p>I love the <del>green </del> <ins>Orange</ins> color.</p>
Try It »
  • <small> is used for small text.
  • <mark> is used to highlights the text.
  • <del> is define the text has been deleted from the content. It will be display a strike a line through the text.
  • <ins> is define a text has been added into content, it will be display by underline the text.