CSS font-style
➔ The font-style property is used to specify what type of font to display.
Syntax
font-style: normal|italic|oblique|initial|inherit;
Property values
| Value | Description |
|---|---|
| normal | Displays the text in a regular font face. This is default. |
| italic | Displays a font using italic face. |
| oblique | Displays a font using the oblique style. |
| initial | Sets the property to its default value. |
| inherit | The element inherits the property value from its parent element. |
Example
#p1 {
font-style: italic;
}
#p2 {
font-style: oblique;
}
#p3 {
font-style: normal;
}
Click on the "Try it Now" button to see how it works.