fontSize property
Sets or retrieves a value that indicates the font size used for text in the object.
Syntax
Integer value = object.put_fontSize(Variant v);Integer value = object.get_fontSize(Variant* sSize);
Property values
Type: VARIANT
relative-size (relative-size)
-
Set of keywords that are interpreted as relative to the font size of the parent object. Possible values include the following: smaller, larger.
length (length)
-
Floating-point number, followed by an absolute units designator (
cm,mm,in,pt, orpc) or a relative units designator (em,ex, orpx). For more information about the supported length units, see the CSS Values and Units Reference. percentage (percentage)
-
Floating-point number, followed by a percent (%). The value is a percentage of the parent object's font size.
String format
<absolute-size>
|
<relative-size>
|
<length>
|
<percentage>
CSS information
| Applies To | All elements |
|---|---|
| Media | visual |
| Inherited | 1 |
| Initial Value | medium |
Remarks
Negative values are not allowed. Font sizes using the proportional "em" measure are based on the font size of the parent object.
As of Microsoft Internet Explorer 6, when you use the !DOCTYPE declaration to specify standards-compliant mode, the default value for this property is medium, not small.
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 Microsoft Internet Explorer 4.0 and later.
Requirements
|
Minimum supported client | Windows XP |
|---|---|
|
Minimum supported server | Windows Server 2003 |
|
Header |
|
|
IDL |
|
|
DLL |
|
See also
- Reference
- IHTMLRuleStyle::font
- Conceptual
- CSS Values and Units Reference
Build date: 11/12/2012