HTML formatting elements

      No Comments on HTML formatting elements

HTML formatting elements are HTML defined special elements for defining text with a special meaning.HTML uses elements like <b> for bold text and <u> for underline text.

Various HTML formatting elements are:

TagExampleResults
<b><b>Bold Text</b>An example of Bold Text
<strong><strong>Strong Text</strong>An example of Strong Text
<em><em>Emphasized Text</em>An example of Emphasized Text
<i><i>Italic Text</i>An example of Italic Text
<small><small>Small Text</small>An example of Small Text
<mark><mark>Mark text</mark>An example of Marked Text
<u><u>Underline Text</u>An example of Underline Text
<sub><sub>Subscript Text</sub>An example of Subscript Text
<sup><sup>Superscript Text</sup>An example of Superscript Text
<del><del>Delete Text</del>An example of Delete Text

HTML <b> and <strong> Elements

HTML <b> elements defines bold text, without any importance.
For example:

<b>I am bold text</b>
I am bold text

HTML <strong> elements defines strong text, and also adds additional semantic importance to the text.
For example:

<strong>I am strong text</strong>
I am strong text

HTML <i> and <em> Elements

HTML <i> elements defines italic text, without any importance.
For example:

<i>I am italic text</i>
I am italic text

HTML <em> elements defines emphasized text, and also adds additional semantic importance to the text.
For example:

<em>I am emphasized text</em>
I am emphasized text

HTML <small> Element

The HTML <small> element defines smaller text:

Example

<h4>HTML <small>Small</small> Formatting</h4>

HTML Small Formatting

HTML <mark> Element

The HTML <mark> element defines marked or highlighted text.
Example

<p>HTML <mark>Marked</mark> Formatting</p>

HTML Marked Formatting

HTML <u> Element

The HTML <u> element defines underlined text.
Example

<p>HTML <u>Underlined</u> Formatting</p>

HTML Underlined Formatting

HTML <sub> Element

The HTML <sub> element defines subscripted text.
Example

<p>HTML <sub>subscripted</sub> Formatting</p>

HTML subscripted Formatting

HTML <sup> Element

The HTML <sup> element defines superscripted text.
Example

<p>HTML <sup>superscripted</sup> Formatting</p>

HTML superscripted Formatting

HTML <del> Element

The HTML <del> element defines deleted (removed) text.
Example

<p>HTML <del>Deleted</del> Formatting</p>

HTML Deleted Formatting

HTML formatting elements

Leave a Reply

Your email address will not be published. Required fields are marked *