Font size

The font size or text size is the overall size (generally height) of a font shown on a screen or printed on a page. A font is typically measured in a point (pt) size, which is the vertical measurement of the lettering. There are approximately 72 (72.272) points in one inch or 2.54 cm. In the example below are four different examples of different point sizes.

12pt 18pt 24pt 36pt

Although points are the traditional measurement of fonts, with computers and other screen displays font sizes are also measured as pixels (px) and in pica (pc).

The font size may also be measured in em space, which is the width of the font generally equal to the point size.

When designing a web page (HTML) or defining a fonts size in CSS a font size can be set as pre-determined font dimensions using the keywords: xx-small, x-small, small, medium, large, x-large, xx-large, smaller, or larger. The font size can also be specified using the Point, Pica, Inch, Centimeter, Millimeter, em, and percentage.

Specifying the font size in an HTML tag

<p style="font-size:2em">This is an example of 2em</p>

Specifying the font size in CSS

In the example below, this CSS code would make any H2 tag on the page with a large font-size.

h2 {
font-size:large;
}

Related pages

Also see: Font, Font scaling, Point, Size, Typography terms