Set different font styles for three paragraphs:
p.normal {
font-style: normal;
}p.italic {
font-style: italic;
}p.oblique {
font-style: oblique;
}
Definition and Usage
The font-style property specifies the font style for a text.
| Default value: | normal |
|---|---|
| Inherited: | yes |
| Animatable: | no. Read about animatable |
| Version: | CSS1 |
| JavaScript syntax: | object.style.fontStyle=”italic” Try it |
CSS Syntax
font-style: normal|italic|oblique|initial|inherit;
Property Values
| Value | Description |
|---|---|
| normal | The browser displays a normal font style. This is default |
| italic | The browser displays an italic font style |
| oblique | The browser displays an oblique font style |
| initial | Sets this property to its default value. Read about initial |
| inherit | Inherits this property from its parent element. Read about inherit |
