This property specifies the size of the font (more specifically the desired height of glyphs from the font).
Values for "font-size"
CSS Level | Value |
CSS Fonts Level 4 | "<absolute-size> | <relative-size> | <length-percentage [0,∞]> | math", where <absolute-size> = "xx-small | x-small | small | medium | large | x-large | xx-large | xxx-large", and <relative-size> = "larger | smaller" |
Syntax Notes for "font-size"
- Absolute sizes include:
xx-small
, x-small
, small
, medium
, large
, x-large
, and xx-large
- Relative sizes include:
larger
and smaller
Notes
- Use of percentage values, or values in 'em's, leads to more robust and cascadable style sheets.
Recommended Links
Accessibility Information & Tips
- When sizing fonts, use CSS and specify relative sizes using "em", percentages or named font sizes like "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large", "smaller", or "larger". Visit https://www.w3.org/TR/WCAG20-TECHS/C12, https://www.w3.org/TR/WCAG20-TECHS/C13, and https://www.w3.org/TR/WCAG20-TECHS/C14 for more information.
Search Engine Links (for more information)