font-style | NN 4 IE 4 CSS 1 |
Inherited: Yes | |
Determines whether the element is rendered in a normal (Roman), italic, or oblique font style. If the font-family includes font faces labeled Italic and/or Oblique, the setting of the font-style attribute summons those particular font faces from the browser's system. But if the specialized font faces are not available in the system, the normal font face is usually algorithmically slanted to look italic. Output sent to a printer with such font settings relies on the quality of arbitration between the client computer and printer to render an electronically generated italic font style. Although personal computer software typically includes other kinds of font rendering under the heading of "Style," see font-stretch, font-variant, and font-weight for other kinds of font "styles." |
|
CSS Syntax | |
font-style: fontStyle
|
|
Value | |
One of the following constants: normal | italic | oblique. Browsers tend to treat italic and oblique settings the same. |
|
Initial Value | |
normal |
|
Example | |
h2 em {font-style: italic} |
|
Applies To | |
All elements. |
|
Object Model Reference | |
[window.]document.getElementById("elementID").style.fontStyle
|