Dofactory.com
Dofactory.com
Earn income with your CSS skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

CSS font-style

The font-style property specifies the style of the font.

Fonts can be styled as normal, italic, or oblique.

Example

#

Text with 3 different font styles.

This text is displayed as normal.

This text is displayed as italic.

This text is displayed as oblique.

<p style="font-style: normal">
  This text is displayed as normal.
</p>
<p style="font-style: italic">
  This text is displayed as italic.
</p>
<p style="font-style: oblique">
  This text is displayed as oblique.
</p>

Syntax

font-style: normal | italic | oblique | 
            initial | inherit;

Values

#

Value Description
normal Default. Displays a normal style
italic Displays an italic font style
oblique Displays an oblique font style
initial Sets the value to its default value.
inherit Inherits the value from its parent element.

Did you know?

Did you know?

Difference between italic and oblique

The difference is that italic is a special version of the font, whereas oblique is a font that is slightly slanted by the browser.

If available, italic is preferred because it's generally a higher quality font.


Browser support

This table shows when font-style support started for each browser.

Chrome
2.0 May 2009
Firefox
1.0 Nov 2004
IE/Edge
4.0 Sep 1997
Opera
7.0 Jan 2003
Safari
1.0 Jun 2003

You may also like


Last updated on Sep 30, 2023

Earn income with your CSS skills
Sign up and we'll send you the best freelance opportunities straight to your inbox.
We're building the largest freelancing marketplace for people like you.
By adding your name & email you agree to our terms, privacy and cookie policies.

Guides