microsoft.com Home   All Products  |   Support  |   Search  |   microsoft.com Home  
Microsoft

Microsoft Typography | Web... | Specifying... | 5.2.6 'font size' | 'font-size' examples next


5.2.6 'font-size' examples


CSS supports the same range of units that you find in most page-layout and word-processing applications. Microsoft® Internet Explorer supports the following units. In addition the official specification also lists 'em' and 'ex' as valid units.

pt - Points

Although the Typographic Point is usually defined as being equal to 1/72 of an inch, the physical size of text specified in points on screen depends on the characteristics of the particular typeface specified as well as the resolution and settings of the display. Information contained in the sections that explain the FONT SIZE tag, helps explain the relationship between CSS font-size and the physical size of type on screen.
P { font-size: 24pt }
point sample

pc - Picas

One Pica is equal to twelve typographic points.
P { font-size: 2pc }
pica example

in - Inches

Like the other absolute values listed previously the size on screen of text specified in inches depends on the characteristics of the particular typeface specified as well as the resolution and settings of the display.
P { font-size: .5in }
inch sample

mm - Millimeters

For our metricated friends.
P { font-size: 12.7mm }
millimeters sample

px - Pixels

Unlike the units described previously, pixel specified text can be relied on to give dependable results on screen.

The other units will produce differing results depending on the particular operating system and display properties of the computer used by the browser. There is no way for a reader to alter the size of type specified on screen in pixels without changing the resolution of their screen. So this method of specifying type size is useful when the relationship between text, bitmap graphics and tables (with widths specified in pixels) is important.

The main drawback of using pixel specified type size is that some readers may object to not being able to alter the size of text on screen. Another, more serious, problem is that the current version of Internet Explorer does not produce legible print output of any pages that specify type in pixels.

P { font-size: 32px }
pixel sample

% - Percentage

The percentage unit is used to specify a type size relative to the default type size for the specified selector.
P { font-size: 200% }
percent sample



this text [ext link] signifies an external link, please read our disclaimer.

this page was last updated 30 June 1997
© 1997 Microsoft Corporation. All rights reserved. Terms of use.
comments to the MST group: how to contact us

 

Microsoft Typography | Web... | Specifying... | 5.2.6 'font size' | 'font-size' examples next