This site is 📱 accessible. Tap here to use the mobile stylesheet.

4.2.3 Font Style

The font-style property is mostly used to specify italic text. This property has three values:

Example 1 - font style
p.normal {
  font-style: normal;
}

p.italic {
  font-style: italic;
}

p.oblique {
  font-style: oblique;
}

Font Weight

The font-weight property specifies the weight of a font:

Example 2 - font weight
p.normal {
  font-weight: normal;
}

p.thick {
  font-weight: bold;
}

Font Variant

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.

Example 3 - font variant
p.normal {
  font-variant: normal;
}

p.small {
  font-variant: small-caps;
}