CSS font-style Property

CSS font-style property is used to italicize the text. It basically specifies how much slant or sloped a text should appear.

The example below sets different font-style for each paragraph:


  font-style: normal;
  font-style: italic;
  font-style: oblique;

CSS Syntax

The font-style property has the following syntax:

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

Property Values

The font-style property accepts the following values:

normalThis is the default value. The text is displayed normally.
italicThe text is slightly slanted.
obliqueThe text is more slanted than italic.
initialSets the font-style property to its default value(normal).
inheritInherits the font-style property from the parent element.

General Info

Default Valuenormal
JavaScript Usageelement.style.fontStyle = “italic”;