CSS font-weight property
Example
Three paragraphs with different font weights:
p
.normal
{
font-weight:
normal
;
}
p
.thick
{
font-weight:
bold
;
}
p
.thicker
{
font-weight:
900
;
}
Try it »
Property definition and usage
The font-weight property sets the weight of text
| Default value: | normal |
|---|---|
| Inherited: | yes |
| Version: | CSS1 |
| JavaScript syntax: | object.style.fontWeight="900" |
Browser support
The numbers in the table indicate the first browser version that supports this property.
| property | |||||
|---|---|---|---|---|---|
| font-weight | 2.0 | 4.0 | 1.0 | 1.3 | 3.5 |
Attribute values
| Value | Description |
|---|---|
| normal | Default value. Defines standard characters. |
| bold | Defines bold characters. |
| bolder | Defines bolder characters. |
| lighter | Defines lighter characters. |
|
|
Related Articles
CSS Tutorial: CSS Font
CSS Reference Manual: font property