Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |
Sets or retrieves a value that indicates the font size used for text in the object .
When you use the !DOCTYPE declaration to specify standards-compliant mode, the default value for this property is small , not medium .
Syntax
{ font-size : sSize } |
object . style.fontSize [ = sSize ] |
Possible Values
sSize | Variant that specifies or receives one of the following values.
|
The property is read/write for all objects except the following, for which it is read-only: currentStyle . The property has a default value of medium . The Cascading Style Sheets (CSS) attribute is inherited.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see About Dynamic Properties .
Remarks
As of Internet Explorer 6, when you use the !DOCTYPE declaration to specify standards-compliant mode, the default value for this property is small , not medium .
Negative values are not allowed. Font sizes using the proportional "em" measure are based on the font size of the parent object.
Possible length values specified in a relative measurement, using the height of the element's font (em) or the height of the letter "x" (ex), are supported in Internet Explorer 4.0 and later.
Examples
The following examples use the font-size attribute and the fontSize property to change font characteristics.This example sets the font size on several paragraphs using different size values.
<STYLE> BODY{ font-size : 10pt } .P1 { font-size : 14pt } .P2 { font-size : 75% } .P3 { font-size : xx-large } .P4 { font-size : larger } </STYLE> Show MeThis example uses inline scripting to set the font size to 14pt when an onmouseover event occurs.
<DIV STYLE=" font-size :12pt" onmouseover="this.style. fontSize ='14pt'"> : </DIV>Standards Information
This property is defined in Cascading Style Sheets (CSS), Level 1 (CSS1) .
Applies To
|
A , ADDRESS , APPLET , B , BIG , BLOCKQUOTE , BODY , BUTTON , CAPTION , CENTER , CITE , CODE , COL , COLGROUP , currentStyle , CUSTOM , DD , defaults , DFN , DIR , DIV , DL , DT , EM , FIELDSET , FORM , hn , HTML , I , INPUT type=button , INPUT type=file , INPUT type=image , INPUT type=password , INPUT type=reset , INPUT type=submit , INPUT type=text , ISINDEX , KBD , LABEL , LEGEND , LI , LISTING , MARQUEE , MENU , OL , P , PLAINTEXT , PRE , runtimeStyle , S , SAMP , SELECT , SMALL , SPAN , STRIKE , STRONG , style , SUB , SUP , TABLE , TBODY , TD , TEXTAREA , TFOOT , TH , THEAD , TR , TT , U , UL , VAR , XMP |
Home | Top | Free Ajax Editor | JavaScript Editor | Get Advanced JavaScript and Ajax Editor, Validator and Debugger! 1st JavaScript Editor. |