Setting Font Style : Making text Italic or Oblique in CSS

Making text Italic or Oblique in CSS :

  1. Many fonts provides us different styles of fonts such as italic or oblique.
  2. Some of the fonts does not have italic version or oblique version of the fonts.
  3. In CSS we can display italic version of text with the help of font-style property.

Live Example :

<html>
  <head>
     <style>
         p.italic {
             font-style:italic
         }
     </style>
  </head>
  <body>
     <p class="italic">This is italic paragraph.</p>
  </body>
</html>

Explanation :

  1. We can make font-style italic to show particular text to be rendered in italic style.
  2. Italic fonts are often slant slightly to the right.
  3. Showing text in Italic font is the most effective way to highlight key words.

Accepted Values of font-style :

font-style normal Text in Normal Way
italic Text in Slant Style
oblique Text in Slant Style
inherite Getting Inherited Value of Parent Element