Home » How to italicize text in CSS

How to italicize text in CSS

by Online Tutorials Library

How to italicize text in CSS?

The font-style property in CSS is used to set whether the font should be styled with normal, italic, or in the oblique face. It defines the type of font we want to display.

There are three values of the font-style property of CSS that are normal, italic, and oblique. The value italic of this CSS property used to italicize the text. This value selects the font, which is classified as italic. The oblique value makes the letters tilted (sloped), and the result will be slightly different from italics.

Italic v/s Oblique

Usually, italic texts are cursive in nature, whereas the oblique faces are the sloped version of the normal face. So, if the font being used doesn’t have any oblique or italic face available, then in most cases, the difference between italic and oblique is very little.

Example

In this example, we are setting the style of heading to italic. If we use the oblique value, the result may also be the same.

Test it Now

Output

How to italicize text in CSS


You may also like