font-style
Italic or normal text.
Syntax
font-style: italic;Values
| Parameter | Type | Description |
|---|---|---|
| normal | keyword | Upright text. |
| italic | keyword | Italic text. |
Examples
An italic quote; the emphasized word inside it is upright:
<style>
.quote { font-style: italic; }
.quote em { font-style: normal; font-weight: bold; }
</style>
<p class="quote">"Simple things should be <em>simple</em>."</p>Notes
<em> and <i> are italic by default; font-style: normal cancels that. If the font has no italic version, the browser slants the regular letters.
See also
- font — A shorthand that sets the style, weight, size, line height and family of the font in one line.
- font-weight — The weight (boldness) of the font.
- text-decoration — Lines on text: underline, strikethrough, overline.
Related recipes
In the tutorial
- Text and fonts — Font family, size, weight, italics, line height, alignment and text decoration, plus loading your own font.