Tutorials Point


  CSS Home

  CSS Reference
  Pseudo Classes & Elements

Copyright © 2014 by tutorialspoint



  Home     References     Discussion Forums     About TP  

CSS - font-style


previous next AddThis Social Bookmark Button


Advertisements

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:

  • normal: Specifies a normal font face; that is, whatever is the default face for the font in use.
  • italic: Specifies an italic font face; that is, one which is slanted and in which the characters have been modified to improve legibility in their slanted state.
  • oblique: Specifies an oblique font face; that is, one which is slanted.

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 Printer Friendly

Advertisements


  

Advertisements