font-style

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;
}

Contributors

Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn CSS on Codecademy

Contributors