In this chapter you will learn:
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.
What is font property?
List of properties based on font.
Example of font property
List of properties based on font-
font properties | |
---|---|
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:-
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.