CSS font-weight Property
The font-weight property sets the weight (or boldness) of the font.
Description & Usage
The font-weight property controls the stroke weight and visual emphasis of characters.
Values range from numeric weights 100 (Thin) to 900 (Black), with 400 representing Normal and 700 representing Bold.
Variable fonts allow smooth continuous weight values anywhere between 100 and 900.
Property Specifications
| Property Feature | Specification |
|---|---|
| Category | Typography |
| Initial Value | normal (400) |
| Inherited | Yes (inherited from parent) |
| Applies To | All elements |
Syntax
font-weight: normal | bold | 400 | 600 | 700 | 800;Property Values
| Value | Description |
|---|---|
| 400 | Normal regular weight. |
| 600 | Semi-bold weight. |
| 700 | Bold weight. |
Code Examples
Bold Subheading
.subheading {
font-weight: 700;
}
Emphasizes section subheading.