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.)
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access