Shorthand
This shorthand property sets 'font-style', 'font-variant', 'font-weight', 'font-stretch', 'font-size', 'line-height', and 'font-family' at the same place in the style sheet.
Values for "font"
CSS Level | Value |
CSS Fonts Level 4 | "[ [ <'font-style'> || <font-variant-css2> || <'font-weight'> || <font-stretch-css3> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-bar" |
Notes
- All font-related properties are first reset to their initial values, including 'font-stretch' and 'font-size-adjust'. Then, those properties that are given explicit values in the 'font' shorthand are set to those values.
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)