CSE 154 Examples

Font Style Property

The Font Style property is used to set how a text appears on the webpage (oblique/italic, etc.)

Description

The font-style property can be set to multiple values:

  • Normal - The font is shown normally.
  • Italic - The font appears in italics.
  • Oblique - The font appears in an oblique fashion. To read more about the difference between italic and oblique, read here.
  • Syntax :

                      
                          element {
                            font-style: normal;
                          }
    
                          p {
                            font-style: italic;
                          }
                      
                    

    HTML :

    CSS :

    Live Preview :