CSS Property font-style

font-style sets the font to use an italic, oblique, or normal font face.


Initial value normal
Inherited Yes.
Version CSS1
JavaScript syntax object.style.fontStyle="italic"
Applies to All elements.

CSS Syntax

font-style: italic | normal | oblique | inherit

Property Values

The property values are listed in the following table.

Value Description
normal A normal font style. This is default
italic An italic font style
oblique An oblique font style
inherit Inherit the font style from the parent element

Browser compatibility

font-style Yes Yes Yes Yes Yes


The following code sets font-style for em and i.

em {font-style: oblique;} 
i {font-style: italic;}
      p {<!--from  www .j ava 2s.c  o  m-->
          font-size: 25px;

      p#oblique {
        font-style: oblique;
    <p id='oblique'>
      This font is oblique.

Click to view the demo