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.

Bold Text

Anything that appears within <b>…</b> element.

Italic Text

Anything that appears within <i>…</i> element.

Underlined Text

Anything that appears within <u>…</u> element.

Strike Text

Anything that appears within <strike>…</strike> element is displayed with strikethrough.

Monospaced Font

The content of a <tt>…</tt> element is written in monospaced font. Most of the fonts are known as variable-width fonts because different letters are of different widths (for example, the letter ‘m’ is wider than the letter ‘i’). In a monospaced font, however, each letter has the same width.

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.

Inserted Text

Anything that appears within <ins>…</ins> element.

Deleted Text

Anything that appears within <del>…</del> element.

Larger Text

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

Smaller Text

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

Exampleformatting1

formatting

 

Advertisements