HTML
HYPERTEXT MARKUP
LANGUAGE
PART II
HTML TEXT FORMATTING
Formatting tags are used to show text as bold,
underlined, italics, etc.
We will be looking at the following text formatting
features in this presentation:
Bold
Italics
Underline
Superscript
Subscript
Centre
alignment of text
HTML TEXT FORMATTING
Bold:
The
tags <b> and </b> are used to bold text.
Example:
<p>This text is not bold</p>
<p><b>This text is bold</b></p>
HTML TEXT FORMATTING
Italics:
The
tags <i> and </i> are used to bold text.
Example:
<p>This text is not italicized</p>
<p><i>This text is italicized</i></p>
HTML TEXT FORMATTING
Underlined:
The
tags <u> and </u> are used to bold text.
Example:
<p>This text is not underlined</p>
<p><u>This text is underlined</u></p>
HTML TEXT FORMATTING
Superscript & Subscript:
The
tags <sup> and </sup> are used to show text as
superscript.
The tags <sub> and </sub> are used to show text as
subscript.
Example:
<p>This text has no superscripts or subscripts</p>
<p>This has <sup>superscripts</sup> and
<sub>subscripts</sub></p>
HTML TEXT FORMATTING
Centre alignment:
The
tags <center> and </center> are used to move the
text to the middle of the line.
NOTE: the spelling is American English
HTML TEXT FORMATTING
Exercise:
Write down the HTML that produces the following:
a)
c)
d)
b)