HTML and CSS Reference
In-Depth Information
Name
font-weight
Values:
normal
|
bold
|
bolder
|
lighter
|
100
|
200
|
300
|
400
|
500
|
600
|
700
|
800
|
900
Initial value:
normal
Applies to:
All elements
Inherited:
Yes
Computed value:
One of the numeric values (
100
, etc.) or one of the numeric values plus one of the relative
values (
bolder
or
lighter
)
Description:
Defines font weight used in rendering an element's text. The numeric value
400
is equivalent
to the keyword
normal
, and
700
is equivalent to
bold
. If a font has only two weights—normal
and bold—the numbers 100 through 500 will be normal, and 600 through 900 will be bold.
In general terms, the visual result of each numeric value must be at least as light as the next
lowest number and at least as heavy as the next highest number.
Examples:
b {font-weight: 700;}
strong {font-weight: bold;}
.delicate {font-weight: lighter;}