Knowledge baseExam Center
ENEnglish
Choose language13

CKTIS / CSS

font-style — selecting a font face style

The font-style property selects an upright, italic, or oblique face. It is inherited; the actual appearance depends on the available fonts.

Version: CSS modules; structured CSSWG indexes reconciled with pinned MDN BCD; Chromium 152 scope gate, per-example verification still required

Syntax

font-style: normal | italic | left | right | oblique <angle [-90deg,90deg]>?;

font-style selects a font face style: normal means upright, italic requests italics, and oblique requests a slanted face. Italics can have different letter shapes, not merely a slope. The initial value is normal; the property is inherited.

oblique accepts an optional angle from -90deg through 90deg, inclusive; its default is 14deg. Positive angles indicate clockwise slant. Face matching or synthesis depends on the font and browser; it does not guarantee an exact visible letter angle.

The displayed syntax also includes draft values left and right, requesting negative and positive italic slants respectively. Do not assume Chromium 152 supports them without separate verification. The property on an element is distinct from the font-style descriptor inside @font-face.

Examples

<!doctype html>
<meta charset="utf-8">
<title>font-style</title>
<style>
  .sample { font-family: serif; font-style: italic; }
  .upright { font-style: normal; }
  .slanted { font-style: oblique 20deg; }
</style>
<p class="sample">Italic <span class="upright">Normal</span> <span class="slanted">Oblique</span></p>

Result

Italic Normal Oblique

The displayed code and declared result were verified in an isolated environment using the method recorded in the verification evidence for this exact version.

Sources