Export (0) Print
Expand All
8 out of 8 rated this helpful - Rate this topic

font-style property

Specifies the font style of the object as italic, normal, or oblique.

Syntax

font-style: normal | italic | oblique

Property values

normal

Initial value. Font is normal.

italic

Font is italic.

oblique

Font is italic.

CSS information

Applies ToAll elements
Mediavisual
Inheritedtrue
Initial Valuenormal

Remarks

Windows Internet Explorer is shipped with a default font-style, but you can change this default in Internet Options.

Examples

This example uses font-style to display text in the default body element text font weight (italic), then display text in a normal font.


body {
  font-style: italic;
  font-family: 'Trebuchet MS', Arial, Helvetica, sans-serif;
}
.normalFontStyle {
  font-style: normal;
}


<body>
  <p>Lorem ipsum dolor sit amet... (font-style: italic)</p>
  <p class="normalFontStyle">Lorem ipsum dolor sit amet... (font-style: normal)</p>
</body>

The following image shows the result:

An image showing text with different font-weight settings.

See also

CSSStyleDeclaration
currentStyle
defaults
runtimeStyle
style
font

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft. All rights reserved.