BlogsDope image BlogsDope

CSS font-style

June 8, 2017 CSS FONT 674

The font-style property allows you to make text italic or oblique. It is a shorthand property of font.


font-style: value;


It can take the following three values.

normal : Text is not italicized.

italic : Text becomes italic i.e. it becomes cursive and slanted.

oblique : Text becomes oblique i.e. it becomes just a slanted version of the normal styled text.

italic and oblique are quite similar with a little difference between the two which can be noticed by just looking at the styled text. italic makes the text cursive and the text occupies lesser space as compared to the normal styled text. On the other hand, oblique just makes the normal font slanted without formatting the text further.

The following example will make the difference between the three clear.

See the Pen font-style by Aakhya Singh (@aakhya) on CodePen.

Browser Support

Ir works in almost all the browsers.

Liked the post?
Inquisitive and passionate Front-end Developer and Web Designer and Co-Founder of CodesDope.
Editor's Picks

Please login to view or add comment(s).