Wednesday, November 13, 2013

Presentational Tags in HTML

If you use a word processor, you are 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.

Bold Text
Anything that appears in a <b>...</b> element is displayed in bold, like the word bold here:
<p>The following word uses a <b>bold</b> typeface.</p>

Italic Text
Anything that appears in a <i>...</i> element is displayed in italicized, like the word italicized here:
<p>The following word uses a <i>italicized</i> typeface.</p>

Underlined Text
Anything that appears in a <u>...</u> element is displayed with underline, like the word underlined here:
<p>The following word uses a <u>underlined</u> typeface.</p>

Strike Text
Anything that appears in a <strike>...</strike> element is displayed with strikethrough, which is a thin line through the text:
<p>The following word uses a <strike>strikethrough</strike> typeface.</p>

Superscript Text
The content of a <sup> element is written in superscript; the font size used is the same size as the characters surrounding it but is displayed half a characters height above the other characters.
<p>The following word uses a <sup>superscript</sup> typeface.</p>

Subscript Text
The content of a <sub> element is written in subscript; the font size used is the same as the characters surrounding it, but is displayed half a characters height beneath the other characters.
<p>The following word uses a <sub>subscript</sub> typeface.</p>

Larger Text
The content of the <big> element is displayed one font size larger than the rest of the text.
<p>The following word uses a <big>big</big> typeface.</p>

Smaller Text
The content of the <small> element is displayed one font size smaller than the rest of the text.
<p>The following word uses a <small>small</small> typeface.</p>

No comments:

Post a Comment