CSS PROPERTIES
Expand All | Collapse All
CSS AT-RULES

CSS font-weight Property

Topic: CSS3 Properties ReferencePrev|Next

Description

The font-weight CSS property sets the weight or boldness of the font.

The following table summarizes the usages context and the version history of this property.

Default value: normal
Applies to: All elements
Inherited: Yes
Animatable: Yes. See animatable properties.
Version: CSS 1, 2, 3

Syntax

The syntax of the property is given with:

font-weight: 
normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | initial | inherit

The example below shows the font-weight property in action.

h1 {
    font-weight: normal;
}
p {
    font-weight: bold;
}

Property Values

The following table describes the values of this property.

Value Description
normal Specifies normal characters.
bold Specifies thick characters.
bolder Selects a font weight that's bolder than the weight inherited from the parent.
lighter Selects a font weight that's lighter than the weight inherited from the parent.
100

The numeric values 100 to 900 form an ordered sequence, where each number indicates a weight that is equal to or darker than its predecessor.

The keyword normal is same as 400, and bold is same as 700.

200
300
400
500
600
700
800
900
initial Sets this property to its default value.
inherit If specified, the associated element takes the computed value of its parent element font-weight property.

Browser Compatibility

The font-weight property is supported in all major modern browsers.

Browsers Icon

Basic Support—

  • Firefox 1+
  • Google Chrome 1+
  • Internet Explorer 3+
  • Apple Safari 1+
  • Opera 3.5+

Further Reading

See tutorial on: CSS Fonts, CSS Text.

Related properties and at-rules: font, font-style, font-variant, font-size, line-height, font-family, @font-face.

Bootstrap UI Design Templates Property Marvels - A Leading Real Estate Portal for Premium Properties