CSS Font - font-style
Description
Use font-style to italicize text. This property also has a value of
oblique however in practice
most browsers display text using this value exactly the same as the
italic value.
The default is
normal
font-style: italic;
font-style: oblique;
font-style: normal;
font-style: inherit;
See also: font, font-size, font-family, font-variant, font-weight.
Examples for font-style
Example 1:
Italic example:
test text test text test text test text
<style>
#test { font-style: italic; }
</style>
<div id="test">test text test text test text test text</div>
Example 2:
Oblique example:
test text test text test text test text
<style>
#test2 { font-style: oblique; }
</style>
<div id="test2">test text test text test text test text</div>
Values for font
| font-style |
normal|italic|oblique |
normal is the default. On most browsers oblique is the same as italic. |
| font-weight |
normal bold bolder lighter 100 200 300 400 500 600 700 800 900 |
normal is the default. 400 is the same as normal. 700 is the same as bold |
| font-size |
em e.g. 1.3em
% e.g. 150%
pt e.g. 14pt
xx-small x-small small medium large x-large xx-large larger smaller
|
Specifies the size of the font/text. |
| font-family |
family-name generic-family
|
Specifies the font name alternatively you can specify the generic name family name of the font/text. |