Property Description
The font-style property sets the font style for a text.
This property has the following syntax:
font-style: normal|italic|oblique|initial|inherit;
Property Values
| Value | Description |
|---|---|
| normal | (default) Browser displays a normal font style |
| italic | Browser displays an italic font style |
| oblique | Browser displays an oblique font style |
| initial | Specifies that the value of the property should be set to the default value |
| inherit | Specifies that the value of the property should be inherited from the parent element |
Examples
This example sets different font styles for three paragraphs.
p.normal {font-style: normal}
p.italic {font-style: italic}
p.oblique {font-style: oblique}
This example shows the results of setting the various font-style values:
font-style: normal
font-style: italic
font-style: oblique
font-style: italic
font-style: oblique
Browser Support
| Chrome | Firefox | IE | Safari | Opera |
|---|---|---|---|---|
| 1.0 | 1.0 | 4.0 | 1.0 | 7.0 |
Miscellaneous Information
| Inherited: | Yes |
|---|---|
| Defined In: | CSS1 |
| Default Value: | normal |
