font-style

Published Jun 29, 2021Updated Sep 3, 2021
Contribute to Docs

To set the font style in which text will appear.

Syntax

font-style: <font-style-value>;

The font-style-value can be the following:

  • normal
  • oblique
  • italic
  • inherit
  • initial

Example 1

Set the p tag to italic:

p {
font-style: italic;
}

All contributors

Looking to contribute?

Learn CSS on Codecademy