Text
font-style
font-style sets whether text is slanted. You can choose the italic face (italic) or the regular glyphs slanted (oblique).
Syntax
normal | italic | oblique <angle [-90deg,90deg]>?Preview
Presets
Drag the bottom-right corner to resize
Code
.box {
font-style: italic;
}Controls
font-styleitalic
About
Writing the value
normal: no slant. This is the initial value.italic: uses the font's italic face. Italics are separately designed glyphs meant to be slanted, so letters such asaandfmay have different shapes.oblique: uses the regular glyphs slanted. The angle can be from-90degto90degand defaults to14deg. Positive values lean right and negative values lean left.
Fallbacks when the font lacks a face
If the font has no italic face, italic falls back to an oblique face, and if there is none of those either, the browser slants the glyphs itself. Most Japanese fonts have no italics, so Japanese text gets the synthesized slant.
How much of the oblique angle is honored depends on the font and the browser. A variable font with a slant axis draws the exact angle.
Watch out
em,i,citeand others areitalicin the browser's default styles. Setfont-style: normalto keep them upright.- The
fontshorthand resets an omittedfont-styletonormal.