×

Html & Html5

The World's best Software Development Study Portal

HTML Formatting


In HTML formatting we formatting text for better look and feel. HTML provides us ability to format text without using CSS. There are many formatting tags in HTML. These tags are used to make text bold, italicized, or underlined.
These tags are as follows:

  • b - Bold text
  • strong - Important text
  • i - Italic text
  • em - Emphasized text
  • mark - Marked text
  • small - Small text
  • del - Deleted text
  • ins - Inserted text
  • sub - Subscript text
  • sup - Superscript text

Example of some formatting tags:


1. bold tag
The HTML b element defines bold text, without any extra importance.

Let's understand this by the following example:


<p > This text is normal </p>

<p > <b >This text is bold </b > </p>


Output:


This text is normal.


This text is bold.



2. HTML mark Element
The HTML mark element defines marked or highlighted text.
Let's understand this by the following example:


<p > This text is normal </p>

<p > This text is <mark > bold </mark > </p>


Output:


This text is normal.


This text is bold .



3. HTML del Element

The HTML del element defines deleted (removed) text.
Let's understand this by the following example:


<p > This text is normal </p>

<p > <del > This text is bold </del > </p>


Output:


This text is normal.

This text is bold.



4. HTML ins Element
The HTML ins element defines inserted (added) text.
Let's understand this by the following example:


<p > This text is normal </p>

<p > This text is <ins > strong and </ins > bold. </p>


Output:


This text is normal.

This text is strong and bold.



5. HTML sub and sup Element
The HTML sub element defines subscripted text.The HTML sup element defines superscripted text.
Let's understand this by the following example:


<p> <sub> This </sub> text is subscript. </p>

<p> This is <sup> superscript. </sup> </p>


Output:


This text is subscript.

This is superscript.