Export (0) Print
Expand All
This topic has not yet been rated - Rate this topic

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, or pc) or a relative units designator (em, ex, or px). 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 ToAll elements
Mediavisual
Inherited1
Initial Valuemedium

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 [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Mshtml.h

IDL

Mshtml.idl

DLL

Mshtml.dll

See also

Reference
IHTMLStyle::font
Conceptual
CSS Values and Units Reference

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.