CSS Font Property

In this chapter you will learn:
What is font property?
List of properties based on font.
Example of font property
CSS font property is used to specify the different style, size, weight, variant etc. of the font of the element. This property is basically used to change the font of text.
List of properties based on font-
font properties
Description
font-family This property specify the family of font like arial, algebrian,calabri etc.
font-size- This property is used to specift the size of font.
font-style- This property is used to change the font in different styles like normal, italic, oblique etc
font-varient This property is used to change the font as small caps
font-weight- This property is used to control weight of text which is given in an element.

Example of font property:-
<html>
<head>
<styletype="text/css">
p
{
font:20px bold;
}
</style>
</head>
<body>
<p>Thisis the example of font property</p>
</body>
</html>

Output:-
example of font property

Summary

In this chapter, you have learned about font property and its uses in the program. Now try yourself to use this property and click on Next button to continue.

 

Share your thought