The font-style
property in CSS is used to alter the font of a segment of text.
The syntax of the font-style
property is as follows:
font-style: normal|italic|oblique|initial|inherit;
There can be five different types of fonts:
normal: Refers to a normal default browser font.
italic: Refers to an italic browser font.
oblique: Refers to an oblique browser font.
initial: Sets the font to an element’s default font.
inherit: Inherits a font from its parent element.
The code snippet below shows each type of font-style
in CSS:
Free Resources