CSS Font Style
The font-style property is typically used to specify italic text.
HTML
1 |
<p class="italic">Welcome to PHPGurukul Programming Blog.</p> |
CSS
1 2 3 |
p.italic { font-style: italic; } |
The font-style Property
The font-style property has three values: normal, italic, and oblique.
Oblique is very similar to italic but less supported.
HTML
1 2 3 |
<p class="normal">Welcome to PHPGurukul Programming Blog</p> <p class="italic">Welcome to PHPGurukul Programming Blog</p> <p class="oblique">Welcome to PHPGurukul Programming Blog</p> |
CSS
1 2 3 4 5 6 7 8 9 |
.normal { font-style: normal; } p.italic { font-style: italic; } p.oblique { font-style: oblique; } |
The HTML <i> tag will produce exactly the same result as the italic font style.