You are here: Reference > CSS > properties > font-weight

font-weight property

Browser support:
Specifies the font weight of the text.
The currentStyle.fontWeight JavaScript property returns only integer values (100 - 900) in Internet Explorer.
JavaScript page for this property: fontWeight. You can find other example(s) there.

Possible values:

 One of the following values: 
normal
Font is normal.
bold
Font is bold.
bolder
Font is bolder.
lighter
Font is lighter.
100
Not bolder than 200 weight.
200
Not bolder than 300 weight.
300
Not bolder than 400 weight.
400
Font is normal.
500
Not lighter than 400 weight and not bolder than 600 weight.
600
Not bolder than 700 weight.
700
Font is bold.
800
Not lighter than 700 weight.
900
Not lighter than 800 weight.
inherit
Takes the value of this property from the computed style of the parent element.
Default: normal.

Example HTML code 1:

This example illustrates the use of the font-weight property:
<head>
    <style>
        .normal {
            font-weight: normal;
        }
        .bold {
            font-weight: bold;
        }
    </style>
</head>
<body>
    <span class="normal">font-weight: normal</span>
    <span class="bold">font-weight: bold</span>
</body>
Did you find this example helpful? yes no

Supported by tags:

Related pages:

External links:

User Contributed Comments

Post Content

Post Content