CSS font-style Property
Example
Set different font styles for three paragraphs:
  
    p.normal {
    font-style: normal;
}
	p.italic {
    font-style: italic;
}
	p.oblique {
    font-style: oblique;
}
  
Try it yourself »
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 | 
Browser Support
The numbers in the table specify the first browser version that fully supports the property.
| Property | ||||||
|---|---|---|---|---|---|---|
| font-style | 1.0 | 12.0 | 4.0 | 1.0 | 1.0 | 7.0 | 
CSS Syntax
font-style: normal|italic|oblique|initial|inherit;
Property Values
| Value | Description | Play it | 
|---|---|---|
| normal | The browser displays a normal font style. This is default | Play it » | 
| italic | The browser displays an italic font style | Play it » | 
| oblique | The browser displays an oblique font style | Play it » | 
| initial | Sets this property to its default value. Read about initial | Play it » | 
| inherit | Inherits this property from its parent element. Read about inherit | 
Related Pages
CSS tutorial: CSS Font
CSS reference: font property
HTML DOM reference: fontStyle property

