CSS font-style propertyCSS font-style property defines what type of font you want to display. It may be italic, oblique, or normal. This CSS property is used to define the style of font for the text content of an element. SyntaxProperty ValuesThe property values of this CSS property are tabulated as follows:
If the given font-family has an embedded oblique or italic font face, the browser will select that face. If there is no oblique or italic face is available, the browser will mimic the sloping effect. If we define the italic value, and there is no italic face is available, the browser will check the oblique face before trying to mimic the italic. The same process will apply to the oblique as if there is no oblique face is available, the browser first checks for italic face before trying to mimic the oblique. To prevent a browser from adding a mimicked version of the oblique or italic face, we can use the font-synthesis property if it is supported. Let's understand the above property values by using an example. ExampleIn this example, we are using all the values of the font-style property. Output: Next TopicCSS Box Sizing |