Html Text Styling?

You can give a style using HTML elements. For heading, italic, bold, underline, small, subscripts and so on. These elements are predefining in html.

Html formatting elements:

  • Bold text
  • Italic text
  • Emphasized text
  • Marked text
  • Small text
  • Deleted text
  • Inserted text
  • Subscripts
  • Superscripts

Bold formatting:

Anything that seems among <b> </b> part, is displayed with bold as shown below:

<p>this text is<b> bold</b>.</p>

Result:
This text is bold.

Italic formatting:

Anything that seems among <i> </i> part, is displayed with italic as shown below:

<p>this text is<b> italic </b>.</p>

Result:
This text is Italic.

Small formatting:

Anything that seems among <small> </small> part, is displayed with small as shown below:

<p>this text is<b> small </b>.</p>

Result:
This text is small.

Deleted formatting:

<del> element describe remove(deleted) the text. Anything that seems among <del> </del> part, is displayed like line-through on the text as shown below:

<p>this text is<del> deleting </ del >.</p>

Result:

this text is deleting .

Inserted formatting:

<ins> element describe inserted(added) text. Anything that seems among <ins> </ins> part, is displayed with inserted as shown below:

<p>this text is<del> deleting </ del >.</p>

Result:

this text is inserted .

Subscript formatting:

Anything that seems among <sub> </sub> part, is displayed with subscripted as shown below:

<p>this text is< sub > subscripted </ sub >.</p>

Result:

this text is subscripted .

Superscript formatting:

Anything that seems among <sup> </ sup> part, is displayed with superscripted as shown below:

<p>this text is< sup > superscripted  </ sup >.</p>

Result:

this text is superscripted .

Leave a Comment.