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.

Bold Text

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

EXAMPLE


This will produce the bellow result



The following word uses a bold typeface.



Italic Text

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

EXAMPLE


This will produce the bellow result



The following word uses an italicized typeface.



Underlined Text

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

EXAMPLE


This will produce the bellow result



The following word uses an underlined typeface.




Strike Text

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

EXAMPLE


This will produce the bellow result



The following word uses a strikethrough typeface.



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.

EXAMPLE


This will produce the bellow result



The following word uses a monospaced typeface.