University of Rochester
EMERGENCY INFORMATIONCALENDARDIRECTORYA TO Z INDEXCONTACTGIVINGTEXT ONLY

Font Sizes

examples of font sizes

Font size can be defined as a pixel size, a percentage, or in em units. It is strongly recommended that you use percentages or em units to define your font sizes. If you define a absolute pixel value, the font size will not change when IE/Windows users try to increase or decrease the font size to meet their own needs.

Percentage values set the size of the font relative to its parent element. Em units set the size of the font relative to what it would have been if you had applied no font size at all. Font size can be a bit tricky; use trial and error and make sure to check your page in multiple browsers.

h2 {font-size: 200%;}
li {font-size: 0.9em;}
p.disclaimer {font-size: 10px;}

Line height

Use the line-height property to control the leading on your pages. Line height is defined in em units or as a percentage. For example, setting a line height of 1.3em means that 1.3 times the font size of the element will be added to the space above and below each line. You can compress the line height by using a value of less than 1.

h1 {line-height: 0.9;}
p {line-height: 1.2;}
#mainlist li {line-height: 200%;}