font-sizefont-size*
*



Contents  *



Index  *Topic Contents
*Previous Topic: font-family
*Next Topic: font-style

font-size

Description

Specifies the size of the font to be used when rendering the text displayed by an element.

Syntax

{ font-size: absolute-size | relative-size | length | percentage |}

Remarks

Initial 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 attribute is inherited.

Applies To

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, 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, INPUT type=button, INPUT type=file, INPUT type=reset, INPUT type=submit, INPUT type=text

Scripting Property

fontSize


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