0% found this document useful (0 votes)
82 views8 pages

HTML 2

This document discusses HTML text formatting tags including: <b> for bold, <i> for italics, <u> for underline, <sup> for superscript, <sub> for subscript, and <center> for centering text. Examples are provided of code to apply each tag and the visual output. An exercise is included to test writing HTML code for given text formatting scenarios.

Uploaded by

Maya Willims
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
82 views8 pages

HTML 2

This document discusses HTML text formatting tags including: <b> for bold, <i> for italics, <u> for underline, <sup> for superscript, <sub> for subscript, and <center> for centering text. Examples are provided of code to apply each tag and the visual output. An exercise is included to test writing HTML code for given text formatting scenarios.

Uploaded by

Maya Willims
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 8

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)

You might also like