Javascript Reference
Categories: STYLE

javascript STYLE fontStyle

@March 15, 2008, 1:22 a.m.
fontStyleFirefox/Netscape/NN 6 IE 4 Chrome/Safari/DOM 2  

Read/Write  

Specifies whether the element is rendered in a normal (roman), italic, or oblique font style. If the fontFamily includes font faces labeled Italic and/or Oblique, the setting of the fontStyle 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. Personal computer software typically includes other kinds of font rendering under the heading of "Style." See fontVariant and fontWeight for other kinds of font "styles."

 
Example
 
document.getElementById("emphasis").style.fontStyle = "italic";
 
Value

One the following string constant values: normal | italic | oblique.

 
Default

normal


Powered by Linode.