CSS font-weight property
Three paragraphs of text set different font weights:
p.thick {font-weight:bold;}
p.thicker {font-weight:900;}
Try it out . . .
Description of property definition and use
The font-weight property sets the weight of the text
Default: | normal |
---|---|
Inherited: | yes |
Version: | CSS1 |
JavaScript syntax: | object .style.fontWeight="900" |
Browser support
The numbers in the table support the first browser version number of the property.
Attributes | |||||
---|---|---|---|---|---|
font-weight | 2.0 | 4.0 | 1.0 | 1.3 | 3.5 |
The property value
Value | Describe |
---|---|
normal | The default. Define standard characters. |
bold | Define bold characters. |
bolder | Define thicker characters. |
lighter | Define thinner characters. |
|
Define characters from thick to thin. 400 is equal to normal, and 700 is equivalent to bold. |
inherit | Specifies that the weight of the font should be inherited from the parent element. |
Related articles
CSS tutorial: CSS Font
CSS Reference Manual: Font Properties