Property Description
The font-weight property sets how thick or thin the characters in text should be displayed.
This property has the following syntax:
font-weight: normal|bold|bolder|lighter|value|initial|inherit;
Property Values
Value | Description |
---|---|
normal | (default) Sets normal characters |
bold | Sets thick characters |
bolder | Sets thicker characters |
lighter | Sets lighter characters |
100
200 300 400 500 600 700 800 900 |
Sets from thin to thick characters. 400 is the same as normal, and 700 is the same as bold |
initial | Specifies that the value of the property should be set to the default value |
inherit | Specifies that the value of the property should be inherited from the parent element |
Examples
This example sets different font weight for two paragraphs.
p.normal {font-weight:normal}
p.thick {font-weight:bold}
This example shows the results of setting the various font-weight values:
font-weight:normal
font-weight:bold
font-weight:bolder
font-weight:lighter
font-weight:bold
font-weight:bolder
font-weight:lighter
Browser Support
Chrome | Firefox | IE | Safari | Opera |
---|---|---|---|---|
2.0 | 1.0 | 4.0 | 1.3 | 3.5 |
Miscellaneous Information
Inherited: | Yes |
---|---|
Defined In: | CSS1 |
Default Value: | normal |