CSS Font Style Property and Italic Text in HTML

Ad Banner Image

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.

CSS Italic Font Styles Property Basic Example
Fig.1 – Italic Font Styles

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.

Font Style Oblique Text Uses
Fig.2 – Font Style Oblique Text Example
Sponsor Banner
You can leave a response, or trackback from your own site.
Leave a Reply to the article


Learn CSS

Learning & Certifications
Follow Us
Facebook Icon   Linked In Icon   Twitter Icon  
Validation and Recognition

Valid CSS! Valid HTML5!

Powered by Wordpress