HTML - Formatting

HTML Formatting

HTML provides you elements that can be used to format you text and give special meaning to other elements. If you are familiar with MS-Word you should know how to make text bold, italics and underline; Now let's do it in HTML!

Bold

For making text bold (thick).
<b>....</b>

Italic

For making text italics (slanted)
<i>....</i>

Underline

For underlining texts.
<u>....</u>

Strike

For drawing a line through the centre of the text.
<strike>....</strike>

Subscript

For displaying content slightly below the line
<sub>....</sub>

Superscript

For displaying content slightly above the line
<sup>....</sup>

Small

To decrease font size by 1 unit from base font size
<small>....</small>

Mark

To highlight text
<mark>....</mark>

Others

Below are some formatting element tags that you can try out on your own.

ELEMENT TAG DESCRIPTION
<strong>

Bolds text (logically important text)

<em>

Italic text (logically italic text)

<del>

To display deleted text (text is strikethrough)

<big>

To increase font size by 1 unit from base font size

<ins>

To display inserted text (text is underlined)

tips
TIP:

Remember to always make your code neat. Always use lowercase letters for your element tags and maintain a good arrangement while coding.

ADVERTISEMENTS

LEARNING IS A CONTINOUS PROCESS - PRACTICE MAKES PERFECT