CSS font style | Learn to Set Text as Italic, Oblique

The font style property

The font-style property is used to make the text italic or oblique in the web pages. The default value of the font style property is normal.

See an example of font-style property

Syntax of font style

Following is the syntax of the CSS font-style property:

font-style: italic;

Where you can use the following values in the font-style property:

  1. italic
  2. oblique
  3. normal (default value)

Example of using font-style property

The example below demonstrates using the font style CSS property.

First heading (h1) is using the default value. The Heading 2 is assigned to use Italic while the Paragraph is using the oblique value in the font-style property.

CSS font style italic

Experience this example online


Further: CSS font-weight to make text bold