CSS font-style Property


Example

Set different font styles for three paragraphs:

p.a {
  font-style: normal;
}

p.b {
  font-style: italic;
}

p.c {
  font-style: oblique;
}
Try it Yourself »

Definition and Usage

The font-style property specifies the font style for a text.

Show demo ❯

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 4.0 1.0 1.0 7.0


CSS Syntax

font-style: normal|italic|oblique|initial|inherit;

Property Values

Value Description Demo
normal The browser displays a normal font style. This is default Demo ❯
italic The browser displays an italic font style Demo ❯
oblique The browser displays an oblique font style Demo ❯
initial Sets this property to its default value. Read about initial
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


Copyright 1999-2023 by Refsnes Data. All Rights Reserved.