CSS font-style

The CSS font-style property is used to style the font of text. For example:

HTML with CSS Code
<!DOCTYPE html>
      .one{font-style: normal;}
      .two{font-style: italic;}
      .three{font-style: oblique;}

   <h2 class="one">font-style: normal</h2>
   <h2 class="two">font-style: italic</h2>
   <h2 class="three">font-style: oblique</h2>

font-style: normal

font-style: italic

font-style: oblique

CSS font-style Syntax

The syntax of font-style property in CSS, is:

font-style: x;

The value of x should be any of the following:

  • normal - used to apply the normal font style. This is the default value
  • italic - used to make the font italic
  • oblique - used to make the font oblique
  • initial - used to use the default value
  • inherit - used to use the value inherited by the parent element

CSS Online Test

« Previous Tutorial Next Tutorial »

Follow/Like Us on Facebook

Subscribe Us on YouTube