Text
font-weight
font-weight sets how thick the text is, as a number from 1 to 1000 or a keyword such as normal or bold.
Syntax
<font-weight-absolute> | bolder | lighter
<font-weight-absolute> = normal | bold | <number [1,1000]>Preview
Presets
Drag the bottom-right corner to resize
Code
.box {
font-weight: 300;
}Controls
font-weight300
About
Writing the value
- A number from
1to1000; larger is bolder. It used to be nine steps of100, but values in between such as350are now valid. normalequals400andboldequals700. The initial value isnormal.bolderandlighterdepend on the parent's weight. With a parent at400,boldergives700andlightergives100; with a parent at700, they give900and400.
Only the weights the font has
When the font has no face at the requested weight, the closest available weight is used instead. When it has no bold face at all, the browser fakes one by thickening the strokes. A variable font can draw any value from 1 to 1000 exactly.
The preview on this page uses the operating system's font (system-ui), so how many distinct weights you can see depends on your OS.
Watch out
h1toh6andstrongare bold (boldorbolder) in the browser's default styles. Set a weight explicitly to make them lighter.- The
fontshorthand resets an omittedfont-weighttonormal.