font-weight

Sets the thickness or boldness of the font. Values can be keywords like 'bold' or numbers (e.g., 400 for regular, 700 for bold).

It is documented as part of the CSS Fonts specification.

/* Usage Example */
strong {
  /* Traditional bold weight */
  font-weight: 700;
}
.thin-text{
  /* Uses a light weight if the font supports it */
  font-weight: 300;
}

/* Syntax */
font-weight: bolder;
font-weight: lighter;

/* Global values */
font-weight: inherit;
font-weight: initial;
font-weight: revert;
font-weight: revert-layer;
font-weight: unset;
Widely available Since 2015 96% global usage

This feature is well established and works across many devices and browser versions. It has been available across browsers since 2015.

2+
1+
1+
12+
Kinsta

Your first month is free

Managed WordPress hosting for faster sites.

Learn more

New CSS drops.

Join 600+ readers who've survived clearfix hacks.

ESC