HTML Formatting


What is HTML Formatting?

There are some elements in html for formatting text with a special meaning. These tags change the appearance of text on a webpage. For example using these tags you can make text bold, italic, emphasized, highlighted , strong too and you can do more things. So these tags are very useful.

In this article you'll learn about text formatting tags.

Categories of formatting tags-

There are two types of formatting tags

  • Physical tag: use these tags to change the visual appearance of the text on the webpage.
  • Logical tag: use these tags to give more important to the text adding logical or semantic value.

List of Text Formatting Elements-

Element Name Short description
<b> make text bold.
<strong> make text strongly important.
<i> make text italic.
<em> make text Emphasized.
<mark> make text highlighted.
<small> make text smaller than normal text size.
<del> make text deleted.
<ins> make text Inserted.
<sub> make text Subscripted.
<sup> make text Superscripted.

Now lets see how it works on a webpage.

HTML <b> Element-

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

Result

html_b_element
Fig.1 - diagram of HTML b element


HTML <strong> Element-

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

Result

html_strong_element
Fig.1 - diagram of HTML strong element


HTML <i> Element-

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

Result

html_i_element
Fig.1 - diagram of HTML italic element


HTML <em> Element-

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

Result

html_em_element
Fig.1 - diagram of HTML em element


HTML <mark> Element-

I am <mark>marked text.</mark>

Result

html_mark_element
Fig.1 - diagram of HTML mark element


HTML <small> Element-

I am <small>small text.</small>

Result

html_small_element
Fig.1 - diagram of HTML small element


HTML <del> Element-

I am <del>deleted text.</del>

Result

html_del_element
Fig.1 - diagram of HTML del element


HTML <ins> Element-

I am <ins>Inserted text.</ins>

Result

html_ins_element
Fig.1 - diagram of HTML ins element


HTML <sub> Element-

I am <sub>Subscripted text.</sub>

Result

html_sub_element
Fig.1 - diagram of HTML strong element


HTML <sup> Element-

I am <sup>Superscripted text.</sup>

Result

html_sup_element
Fig.1 - diagram of HTML sup element