HTML and CSS Reference
In-Depth Information
Name
font
Values:
[[ <'font-style'> || <'font-variant'> || <'font-weight'> ]? <'font-size'> [ / <'line-height'> ]? <'font-
family'>] | caption | icon | menu | message-box | small-caption | status-bar
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
Description:
A shorthand property used to set all the aspects of an element's font 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 . If keywords are not used, the minimum font value mustinclude the
font size and family inthatorder, and any font value that is not a keyword must end with the
font family. Otherwise, the font declaration will be ignored.
Examples:
p {font: small-caps italic bold small/
1.25em Helvetica,sans-serif;}
p.example {font: 14px Arial;} /* technically correct,
although generic font-families are encouraged for
Search WWH ::




Custom Search