Scanner class Methods in Java

CSS font-style Property

font-style property

Sometimes we require to give individual look to element. This way the element can stand out from others and gets highlighted.We can do this using the italic property of text. 
We can use font-style property for this. This property is mainly used to make the text italic.

The HTML Code:

<p class="italic"> This paragraph is in italic style.
</p>

The CSS Code:

p.italic{
     font-style:italic;
}

Result:

CSS font-style property example

Values of font-style Property

The font-style property has three values:normal,italic, and oblique.
Oblique is very similar to italic ,but less supported.

The HTML Code:
<p class="italic"> This paragraph is in italic style.
</p>
<p class="oblique"> This paragraph is in oblique style.
</p>
<p class="normal"> This paragraph is in normal style.
</p>

The CSS Code:

p.italic{
     font-style:italic;
}
p.oblique{
     font-style:oblique;
}
p.normal{
     font-style:normal;
}
Result:


CSS font-style property example

Comments