print
Advertisment
Advertisment

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 .

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 underlined as shown below -

Strike Text

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

Monospaced Font

The content of a <tt>_<tt> element is written is monospaced font . Most of the ; fonts are known as variable-width fonts because different letters are of different 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 characters height above the others characters .

Subscripts 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 characters height beneath the other characters .

Inserted Text

Anything that appears within <ins>_<ins> element is displayed as inserted text.

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 -

Grouping Content

The <div> and <span> elements allow you to group together several elements to create sections or subsections of a page .  For example - you might want to put all the footnotes on a page within a <div> element to indicate that all of the elements within that <div> element relate to the footnotes . You might than attach a style to this <div> element so that they appear using a special set of style rules .

The <span> element , one the other hand , can be used to group inline elements only . So , if you have a part of a sentence or paragraph which you want to group together , you could use the <span> element as follows -

Advertisment
Advertisment
arrow_upward