info@tutsfinder.in



HTML Text Formatting Tags



As a word suggest Formatting is a way to present your text in a more attractive and enhanced way.

Formatting can be done in many ways like bold, italic, underlined.

Bold Text

<p>Anything that appears within <b>../b> element is displayed in bold.</p>

Example:

<p>The following word uses a <b> bold </b> typeface. </p>

Underlined Text

Anything that appears within <u>..</u> elements is displayed with underline.

Example:

<p>The following word uses an <u> underlined </u> typeface. </p>

Italic Text

Anything that appears within <i>..</i> elements is displayed in italicized.

Example:

<p>The following word uses an <i> italicized </i> typeface. </p>

Small Text

The content displayed in <small>..</small> elements shows the size of font one smaller than the rest of the text.

Example:

<p>The following word uses a <small> small </small> typeface. </p>

Large Text

The content displayed in <large>..</large> elements shows the size of font one larger than the rest of the text.

Example:

<p>The following word uses a <large> large </large> typeface. </p>

Superscript Text

The content of a <sup>..</sup> element is written in a superscript, the font size is same it just shows the text half a character’s size above the other characters.

Example:

<p>The following word uses a <sup> superscript </sup> typeface. </p>

Subscript Text

The content of a .. element is written in a subscript, the font size is same it just shows the text half a character’s size beneath the other characters.

Example:

<p>The following word uses a <sub> subscript </sub> typeface. </p>

Monospaced Font

It is used when you want to write your text having same width for each character.

Syntax: <tt>.. </tt>
Example:

<p>The following word uses a <tt>monospaced font </tt> typeface. </p>

Grouping Content

The <div> and <span> elements allow you to group together several elements to create sections or subsections of a page.

Below table consisting of some other formatting elements that are commonly used.


Text Formatting