Name
font-size — IE4 P/Q | IE5 P/Y | NN4 Y/Y | Op3 Y/-
Synopsis
This sets the size of the font. This can be defined as an absolute size, a relative size, a length value, or a percentage value. Negative length and percentage values are not permitted. The dangers of font-size assignment are many and varied. Some of these dangers are covered in Chapter 4.
Example
H2 {font-size: 200%;} H3 {font-size: 36pt;}
Values
xx-small | x-small | small | medium | large | x-large | xx-large | larger | smaller | <length> | <percentage> |
Default
medium
Inherited
yes
Applies to
all elements
Percentage values are relative to the parent element’s font size.
Get Cascading Style Sheets: The Definitive Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.