The font-size property defines the relative or absolute size of the font, given its family name.
The font-size property contains following information:
- value: <absolute-size>, <relative-size>, <length>, <percentage> or inherit;
- initial: medium;
- applies to: all elements;
- inherited: yes;
- percentages: refers to inherited value;
- media: visual;
- computed value: absolute length.
The font size corresponds to 'em' square value which is often used in typography.
In <absolute-size> values can be xx-small, x-small, small, medium, large, x-large and xx-large, with the medium value is user preferred (set in browser 'option' menu).
To preserve readability it is suggested to the browsers to avoid sizes that are smaller than 9 pixels per EM unit on a computer display.
Possible values for <relative-size> are larger and smaller while other values are referring to the computed font size of the current element based on the inherited value.
CSS font-size property example: