Making text Italic or Oblique in CSS :
- Many fonts provides us different styles of fonts such as italic or oblique.
- Some of the fonts does not have italic version or oblique version of the fonts.
- 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 :
- We can make font-style italic to show particular text to be rendered in italic style.
- Italic fonts are often slant slightly to the right.
- 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 |