Chapter 28: CSS Font Style (Italic Fonts)

Setting the style of the font allows you to make the text within an element appear normal, italic, or oblique. Both oblique and italic seem to produce the same effect whenever I've tried it: italic text. Setting the font style of an element is done with the font-style property.

  • Normal text
  • Italic text
  • Oblique text

If you wanted an element with the ID site-slogan to appear in italics you would do the following:

#site-slogan
{
 font-style: italic;
}

You're welcome to try it out yourself if you wish. If not, onto the quiz!