CSS Font Style Property and Italic
Font Style Property is used to change the font look of the text. Mainly Italic and Oblique are two font styles. And font-style property is used to apply the style.
Italic Style is slightly tilted to right side.
Example 1 – Font Style Property Basic Uses
<!DOCTYPE html>
<html>
<head>
<style>
.a
{
font-style: italic;
}
</style>
</head>
<body>
<p>This is a default font-style of paragraph element.</p>
<p class="a">Lorem ipsum urna condimentum pellentesque id nibh tortor id aliquet. Ut pharetra sit amet aliquam id diam maecenas ultricies mattis.</p>
</body>
</html>
In the above code we apply the font-style to a paragraph element.
Oblique Font Styles Text
Oblique Font Style is just a titlled version of regular style of an HTML Element.
Example 2 – Font Style Oblique Text Uses
<!DOCTYPE html>
<html>
<head>
<style>
.a
{
font-style: oblique;
}
</style>
</head>
<body>
<p>This is a default font-style of paragraph element.</p>
<p class="a">Lorem ipsum urna condimentum pellentesque id nibh tortor id aliquet. Ut pharetra sit amet aliquam id diam maecenas ultricies mattis.</p>
</body>
</html>
In the above code we apply the oblique font-style to a paragraph element.

March 20th, 2019
Nilesh Chaurasia
Posted in
Tags:
