Typography

CSS font-weight Property

Sets the boldness of the font

Syntax

CSS
font-weight: normal | bold | bolder | lighter | <number>;

Values

ValueDescription
normalEquivalent to 400
boldEquivalent to 700
100-900Numeric weight values
bolderOne weight bolder than parent
lighterOne weight lighter than parent

Example

CSS
.heading {
  font-weight: 700;
}
.light-text {
  font-weight: 300;
}

Understanding CSS font-weight

The CSS font-weight property sets the boldness of the font. As part of the Typography module in CSS, it is one of the most commonly used properties for controlling the visual presentation of web pages.

You can set font-weight to values such as normal, bold, 100-900, bolder, among others. Each value changes how the browser renders the affected element, giving you fine-grained control over your page layout and design. Choosing the right value depends on the specific design requirements of your project.

Common use cases for the font-weight property include responsive web design, component-based layouts, and creating visually consistent interfaces across devices. It works closely with related properties like font, font-family, font-style to achieve complex styling effects. Understanding how these properties interact helps you write cleaner, more maintainable stylesheets.

Browser support for font-weight is excellent across all modern browsers including Chrome, Firefox, Safari, and Edge. For older browsers, consider using fallback values or progressive enhancement strategies. The property can also be set dynamically via JavaScript using element.style.fontWeight or the CSS custom properties (variables) approach for theming.

Related Properties

Explore More CSS Properties

Browse our complete reference of 251 CSS properties with syntax, examples, and tips.