CSS font-style property
Example
Three paragraphs with different font styles:
p.normal {font-style:normal}
p.italic {font-style:italic}
p.oblique {font-style:oblique}
Try it »
Property definition and usage
The font-style property specifies the font style of text.
| Default value: | normal |
|---|---|
| Inherited: | yes |
| Version: | CSS1 |
| JavaScript syntax: | object.style.fontStyle="italic" |
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| font-style | 1.0 | 4.0 | 1.0 | 1.0 | 7.0 |
Attribute values
| Value | Description |
|---|---|
| normal | Default value. The browser displays a standard font style. |
| italic | The browser displays an italic font style. |
| oblique | The browser displays an oblique font style. |
| inherit | Specifies that the font style should be inherited from the parent element. |
Related Articles
CSS Tutorial: CSS Font
CSS Reference Manual: font property