Easy Tutorial
❮ Prop Tabledata Headers Prop Form Action ❯

fontStyle Attribute


Definition and Usage

The fontStyle property sets or returns whether the font style is normal, italic, or oblique.

Syntax

Set the fontStyle property:

Return the fontStyle property:

Value Description
normal Default. The font is normal.
italic The font is italic.
oblique The font is oblique.
inherit The value of the fontStyle property is inherited from the parent element.

Browser Support

All major browsers support the fontStyle property.

Note: IE7 and earlier versions do not support the "inherit" value. IE8 only supports "inherit" if the !DOCTYPE is specified. IE9 supports "inherit".


Example

Change the font to italic:


❮ Prop Tabledata Headers Prop Form Action ❯