fontSizefontSize*
*Contents  *Index  *Topic Contents
*Previous Topic: fontFamily
*Next Topic: fontSmoothingEnabled

fontSize

Description

Sets or retrieves the size of the font used for text in the element.

Syntax

object.style.fontSize[ = fontSize]

Remarks

The default value is medium. Negative values are not allowed. Font sizes are computed based on the font size of the parent element. Therefore, a font size of "10em" means that the size of the "em" is based on the font used by the parent element.

The values for font size are shown below:
absolute-sizeA set of keywords that indicate predefined font sizes. Possible keywords include [xx-small | x-small | small | medium | large | x-large | xx-large]. Named font sizes scale according to the user's font setting preferences.
relative-size A set of keywords that are interpreted as relative to the font size of the parent element. Possible values include [ larger | smaller].
length An absolute value for the font size.
percentageA percentage value of the parent element's font size.

This property has read/write permission.

Applies To

HTML Tags A, ADDRESS, APPLET, B, BIG, BLOCKQUOTE, BODY, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, DD, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, H1, H2, H3, H4, H5, H6, HTML, I, INPUT, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP
Scripting style

CSS Attribute

font-size


Up Top of Page
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.