TutorialLab
html formatting
Home » Web Development » HTML Tutorials » HTML Formatting

HTML Formatting

HTML Formatting

If you use a word processor, you must be familiar with the ability to make text bold, italicized, or underlined; these are just three of the ten options available to indicate how text can appear in HTML and XHTML.HTML Formatting elements were designed to display special types of text:

Bold Text

Anything that appears within <b>…</b> element, is displayed in bold as shown below:

Italic Text

Anything that appears within <i>…</i> element is displayed in italicized as shown below:

Underlined Text

Anything that appears within <u>…</u> element, is displayed with underline as shown below:

Strike Text

Anything that appears within <strike>…</strike> element is displayed with strikethrough, which is a thin line through the text as shown below:

Superscript Text

The content of a <sup>…</sup> element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a character’s height above the other characters.

Subscript Text

The content of a <sub>…</sub> element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a character’s height beneath the other characters.

Deleted Text

Anything that appears within <del>…</del> element, is displayed as deleted text.

Larger Text

The content of the <big>…</big> element is displayed one font size larger than the rest of the text surrounding it as shown below:

Smaller Text

The content of the <small>…</small> element is displayed one font size smaller than the rest of the text surrounding it as shown below:

Previous Lecture Next Lecture

Aizaz Ali

HTML Tutorials