font-style | css font-style
Thefont-stylepropertyallowsyoutomaketextappearitalicized(i.e.sloped,orslanted).em{ font-style:italic; }Thispropertyacceptsoneofthreepossiblevalues:normal,italic,andoblique.Ifagivenfontfamilyhasanitalicorobliquefaceembedded,thebrowserwillselectthatface.Ifnoitalicorobliquefaceisavailable,thebrowserwillmimictheslopingeffect.Ifitalicisdefinedandthereisnoitalicfaceavailable,thebrowserwilllookforanobliquefacebeforeittriestomimictheitalic.Thesameappliestooblique;ittoowilllookfirstforanitali...
The font-style property allows you to make text appear italicized (i.e. sloped, or slanted).
em { font-style: italic; }This property accepts one of three possible values: normal, italic, and oblique.
If a given font family has an italic or oblique face embedded, the browser will select that face. If no italic or oblique face is available, the browser will mimic the sloping effect. If italic is defined and there is no italic face available, the browser will look for an oblique face before it tries to mimic the italic. The same applies to oblique; it too will look first for an italic face.
To prevent the browser from adding a mimicked, or synthesized, version of the italic or oblique face, you may use the font-synthesis property (if supported).
Italic vs. ObliqueAccording to the spec, “Italic forms are generally cursive in nature while oblique faces are typically sloped versions of the regular face.” However, if the font being used does not h...