This kind of property is used to change the font-styles, its size, and name for any HTML elements.
Property | Description | Values | CSS |
Font | Sets all the font properties in one declaration | font-style font-variant font-weight font-size/line-height font-family caption icon menu message-box small-caption status-bar inherit | 1 |
font-family | Specifies the font family for text | family-name generic-family inherit | 1 |
font-size | Specifies the font size of text | xx-small x-small small medium large x-large xx-large smaller larger length % inherit | 1 |
font-style | Specifies the font style for text | Normal italic oblique inherit | 1 |
font-variant | Specifies whether or not a text should be displayed in a small-caps font | Normal small-caps inherit | 1 |
font-weight | Specifies the weight of a font | Normal bold bolder lighter 100 200 300 400 500 600 700 800 900 inherit | 1 |
Example-1
<html>
<head>
<style type=”text/css”>
body
{
font-family:Verdana, Arial, Helvetica, sans-serif;
font-size:20px;
font-style:italic;
}
</style>
</head>
<body>
Hello World
</body>
</html>
Example-2
<html>
<head>
<style type=”text/css”>
p
{
font-variant:small-caps;
font-weight:200;
}
</style>
</head>
<body>
<p>Hello World</p>
</body>
</html>
No comments:
Post a Comment