Copyright © tutorialspoint.com

CSS - font-style

previous next


Description:

The font-style property determines the use of one of three font faces to be used in the rendering of a given element's text.

Possible Values:

Applies to:

All the HTML elements

DOM Syntax:

object.style.fontStyle="italic";

Example:

Here is the example using this property:

<p style="font-style:italic;">
This text will be rendered in italic style
</p>

This will produce following result:

This text will be rendered in italic style

To Become more comfortable - Do Online Practice


previous next

Copyright © tutorialspoint.com