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 2.1 | an absolute size, a relative size, a length, or a percentage |
CSS3 | an absolute size, a relative size, a length, or a percentage |
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)