HTML Formatting

HTML formatting provides the ability to format the texts in different way. Sometimes it is needed to display some texts differently from other texts and it can be done by HTML formatting.

Example:

<b> This is a bold text. </b>
<i> This is an italic text. </i>
<mark> This is a mark text. </mark>

Run Example

Here we giving the tag list using mostly for HTML formatting.

Tag name Tag description
<b> It is used to bold a text.
<strong> By this text the browser can understand that the text is important.
<i> It is used to make a text italic.
<em> It is used to emphasize a text.
<mark> It is used to mark a text.
<small> It is used to make the size small of a text.
<big> It is used to make the size big of a text.
<u> It is used to underline a text.
<sub> It is used to subscript a text.
<sup> It is used to superscript a text.
<del> It is used to display a deleted text.
<ins> It is used to display an inserted text.

Difference between <b> and <strong>

The <b> and the <strong> both text give the same result, but by using the <strong> tag you can give importance to the text. When the <strong> tag is used the browser understand that the text is important. On the otherhand the <b> tag is used only to bold the text it doesn't give any importance to the text.

Example:

<b> This is a bold text. </b>
<strong> This is a strong text. </strong>

Run Example

Difference between <i> and <em>

Similary the <i> and the <em> both text give the same result, but by using the <em> tag you can give importance to the text. When the <em> tag is used the browser understand that the text is emphasized. On the otherhand the <b> tag is used only to italicize the text it doesn't give any importance to the text.

Example:

<i> This is an italic text. </i>
<em> This is an emphasize text. </em>

Run Example