CSS Font-Size Property

In this chapter you will learn:
About font-size property
Example of this property
Font-size property is used to specify the size of the font. You can set the size of the font which is used in an element like paragraph, division, body etc.
Example of this property:
<html>
<head>
<style type="text/css">
#a
{
font-size:15px;
}
#b
{
font-size:25px;
}
#c
{
font-size:40px;
}
</style>
</head>
<body>
<p id="a"> This is the example of font-size:15px</p>
<p id="b"> This is the example of font-size:25px</p>
<p id="c"> This is the example of font-size:40px</p>
</body>
</html>

Guide:-
In the given program #a, #b and #c are the ids which have used with a paragraph to show the result of different font-size values.
Output:- example of font-size property
Note:-
You can give the value of font-size in em unit which is equal to the actual size of the font. For more information of em go to the chapter units.

Summary

In this chapter, you have learned about the font-size property of CSS so now try to use this property in your program. One example is given for your help so follow it and click on Next button to continue-

 

Share your thought