The font-style property is mostly used to specify italic text.
The font style property has 3 values.
normal – The text is shown normally.
italic – The text is shown in italics.
oblique – The text is “leaning” (oblique is very similar to italic, but less supported)
Given below is an example of Font Style Property
The font-weight property specifies the weight of a font:
Given below is an example
The font-variant property specifies whether or not a text should be displayed in a small-caps font.
In a small-caps font, all lowercase letters are converted to uppercase letters.
However, the converted uppercase letters appears in a smaller font size than the original uppercase letters in the text.
The font-size property sets the size of the text.
Being able to manage the text size is important in web design. However, you should not use font size adjustments to make paragraphs look like headings, or headings look like paragraphs.
Always use the proper HTML tags, like
for headings and
The font-size value can be an absolute, or relative size.
1. Sets the text to a specified size.
2. Does not allow a user to change the text size in all browsers (bad for accessibility reasons).
3. Absolute size is useful when the physical size of the output is known.
1. Sets the size relative to surrounding elements.
2. Allows a user to change the text size in browsers.
If you do not specify a font size, the default size for normal text, like paragraphs, is 16px (16px=1em).
Example on Font-size
This webpage shows some famous declarations and sayings, add a CSS rule to make all quotes have an italic font style.