Name
font
Synopsis
This is a
shorthand property used to set two or more aspects of an
element’s font all at once. It can also be used to
set the element’s font to match an aspect of the
user’s computing environment using keywords such as
icon
. Note that if these keywords are not used,
the minimum font value must include the font size and family.
Values:
[[ <font-style> || <font-variant> || <font-weight>
]? <font-size> [ / <line-height> ]? <font-family>]
| caption
| icon
|
menu
| message-box
|
small-caption
| status-bar
|
inherit
Initial value:
refer to individual properties
Applies to:
all elements
Inherited:
yes
Percentages:
calculated with respect to the parent element for <font-size> and with respect to the element’s <font-size> for <line-height>
Computed value:
see individual properties (font-style
, etc.)
Get Cascading Style Sheets: The Definitive Guide, Second Edition 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.