0% found this document useful (0 votes)
2 views4 pages

Lesson 3 HTML Text Formatting

i

Uploaded by

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

Lesson 3 HTML Text Formatting

i

Uploaded by

oioioiler622
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

LESSON 3 - HTML TEXT FORMAT TING

What is text formatting?

Text Formatting basically refers to the enhancing of text in order to increase the visual appeal.

IMPORTANT OF TEXT FORMATTING


[Link] the document readable to the person reading it.
[Link] can help to enhance the viewers ‘ look at the web page, making them more at ease to surf.

FORMAT TING TAG

Formatting tag is made up of several related tags that change the appearance
of a text.

FORMAT TING TAGS


EXAMPLE 1

<html>
<head>
<title>Formatting Tags</title>
</head>
<body>
<pre>
<center><h1>Courses:</h1>
<b>HTML</b>
<u>MS Word</u>
<i>MS Excel</i>
MS PowerPoint
X<sub>2</sub>
Y<sup>2</sup>
</pre>
</body>
</html>

BODY TAGS

The body tag in HTML is used to define the main content of a web page contains all
the visible content of the web page, including text, images, links, and other elements.

< body ></body> - specifies that your in the body of the document.

Attributes of <body> tags

text -indicates the color of normal text within the document.


Code Example : < body text="blue" >

bgcolor - indicates the color of the document background.


Code Example : < body bgcolor="blue" >

background - specifies the relative or absolute location of an image file


that lies across the document background.
Code Example : < body background="url" >

Font Tags
The font tag in HTML was used to define the font size, color, and face for
text content within the document.
< font > </font> - sets or alters the characteristics of the font which the
browser uses to display text.

Attributes of Font Tags


[Link] – this attribute used to specify text color within the <font> tag.
Code Example : < font color ="blue" >TEXT</font>

[Link] – this attribute is used to specify the font family.


Code Example : < font face="arial" > TEXT</font>

[Link] - this attribute refers to the size of the font.


Code Example : <font size=”15”> TEXT </font>

EXAMPLE 1: USING FONT-SIZE

<html>

<head>
<title>Setting Font Size</title>
</head>

<body>
<font size = "1">Font size = "1"</font><br>
<font size = "2">Font size = "2"</font><br>
<font size = "3">Font size = "3"</font><br>
<font size = "4">Font size = "4"</font><br>
<font size = "5">Font size = "5"</font><br>
<font size = "6">Font size = "6"</font><br>
<font size = "7">Font size = "7"</font>
</body>

</html>
EXAMPLE 2: USING FONT-FACE AND FONT-SIZE

<html>

<head>
<title>Font Face</title>
</head>
<body>
<font face = "Times New Roman" size = "5">Times New
Roman</font><br>
<font face = "Verdana" size = "5">Verdana</font><br>
<font face = "Comic sans MS" size =" 5">Comic Sans
MS</font><br />
<font face = "WildWest" size = "5">WildWest</font><br>
<font face = "Bedrock" size = "5">Bedrock</font><br>
</body>
</html>

EXAMPLE 3: USING FONT-COLOR AND FONT-SIZE

<html>

<head>
<title>Font Face</title>
</head>
<body>
<font face = "Times New Roman" size = "5">Times New
Roman</font><br>
<font face = "Verdana" size = "5">Verdana</font><br>
<font face = "Comic sans MS" size =" 5">Comic Sans
MS</font><br>
<font face = "WildWest" size =
"5">WildWest</font><br>
<font face = "Bedrock" size = "5">Bedrock</font><br>
</body>
</html>

You might also like