Setting CSS font weight
The CSS font-weight
property lets you manipulate the boldness of the font:
Example
p {
font-weight: normal;
}
a {
font-weight: bold;
}
p.thick {
font-weight: 780;
}
CSS font-weight syntax explained
To define custom boldness for the font, you need to define a single value:
font-weight: value;
CSS font weight can be specified in either a keyword or a numeric value.
Value | Description |
---|---|
Numeric values | A unitless number in the range from 1 to 1000 . The higher the number, the bolder the text |
normal |
The default value which is equal to 400 . The text boldness is usual for the chosen font |
bold |
The text is in bold font. Equal to 700 |
bolder |
The text boldness increases |
lighter |
The text boldness decreases |
Browser support
Chrome
2+
Edge
12+
Firefox
1+
IE
3+
Opera
3.5+
Safari
1+
Mobile browser support
Chrome
18+
Firefox
4+
Opera
10.1+
Safari
1+