CSS Property - Font Style

Value: normal | italic | oblique
Initial: normal
Applies to: all elements
Inherited: yes
Percentage values: N/A

The CSS property "font-style" selects between normal (sometimes referred to as "roman" or "upright"), italic and oblique faces within a font family.

A value of "normal" selects a font that is classified as "normal" in the UA's font database, while "oblique" selects a font that is labeled "oblique". A value of "italic" selects a font that is labeled "italic", or, if that is not available, one labeled "oblique".

The font that is labeled "oblique" in the UA's font database may actually have been generated by electronically slanting a normal font.

Fonts with Oblique, Slanted or Incline in their names will typically be labeled "oblique" in the UA's font database. Fonts with Italic, Cursive or Kursiv in their names will typically be labeled "italic".

Example:

h1, h2, h3 {
font-style: italic;
}

In the following example the emphasized text within the "H1" tag will appear in a normal face instead of being "italic". This is due to the "H1" element telling the "EM" tag to overwrite the pre-defined rule with its own.

Example:

h1 em {
font-style: normal;
}

HTML Code:
<h1>This is the <em>result</em></h1>

If the suggested scaling factor of 1.5 is used, the last three declarations are identical.