Skip to: content, navigation

by Tommy Olsson and Paul O’Brien

font-weight (CSS property)

Browser support full matrix
IE5.5+ FF1+ Saf1.3+ Op9.2+
Full Full Full Full
Spec
Inherited Initial Version
Yes normal CSS1, 2

Example

This style rule makes emphasized elements display with a bolder weight than that of their parent elements:

em {
  font-weight: bolder;
}

Try it yourself!View all demos

Description

This property sets the font weight that’s applied to the text content of an element.

Note that many common computer fonts are only available in a limited number of weights (often, the only options are normal and bold).

Value

The numeric values 100900 specify font weights where each number represents a weight equal to or darker than its predecessor. 400 is considered the “normal” weight. If the specified font isn’t available in the specified weight, the font weight will be mapped to a suitable existing value.

The following keywords can also be used for this property:

bold
is a synonym for 700
bolder
selects a font weight that’s darker than that inherited from the parent element
lighter
selects a font weight that’s lighter than that inherited from the parent element
normal
is a synonym for 400

Compatibility

IE5.5Full
6.0Full
7.0Full
Firefox1.0Full
1.5Full
2.0Full
Safari1.3Full
2.0Full
3.0Full
Opera9.2Full
9.5Full

Internet Explorer for Windows versions up to and including 7 don’t support the value inherit.

User-contributed notes

There are no comments yet.

Add a note

To post a note on this topic, please log in with your SitePoint username and password. If you don't have an account yet, you can create a new account for free.

Related Products

The Principles of Beautiful Web Design

Best Seller!

You don’t need to go to Art School to design great looking web sites!

Book Cover: The Principles of Beautiful Web Design

Download the FREE sample chapters