Page 88 - TP_Play_V2.1_class7
P. 88
FONT PROPERTIES
In HTML5, text appearance is controlled by using CSS font properties. These properties allow you
to style the text by changing the font family, size, weight, and style, enhancing both readability
and visual appeal. For example, you can make text bold, italicised, or adjust the space between
lines. These font properties are essential for making content attractive and engaging for users
on the web.
Various Font properties and their values are given in the table below:
Property Value Description Example
Specifies the font
font-family Name of the font font-family: Arial;
to be used.
Specifies the font
Value is given in pixels. The default
font-size size used on the font-size:25px;
font size for the text is 16 px.
web page.
Specifies the style
font-style normal, italic font-style:italic;
of the font.
Specifies thickness
font-weight normal, bold, bolder, lighter font-weight:bold;
of the font.
<!DOCTYPE html>
<HTML> <HEAD> <STYLE>
H1 {color: blue; font-family: verdana; font-size: 32px; text-align:
center}
H2 {color: Green; font-family: Arial; font-size: 25px; text-align:
center}
</STYLE> </HEAD>
<BODY>
<H1>Computer</H1>
<P style="font-family: verdana; font-size: 22px">A computer is a
versatile machine that can be used to carry out a variety of tasks. For
example, you can do your homework, play games, listen to songs and do
many other things on a computer.</P>
<H2>Types of Computer</H2>
<P style="font-family:Arial Black; font-size: 18px">There are many
types of computers. Based on their size, the types of computers
are, micro computer, mini computer, mainframe computer and super
computer.
</P>
</BODY>
</HTML>
86 Play (Ver. 2.1)-VII

