font-weight

The font-weight property specifies the weight of the font.

Syntax

font-weight: normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | inherit
Initial: normal
Applies To: all elements
Inherited: yes
Percentages: NA
Media: visual

Values

font-weight: value
Value Description
bold 700 in the ordered sequence
bolder Bolder relative to the weight inherited from the parent
lighter Lighter relative to the weight inherited from the parent
normal 400 in the ordered sequence

DOM

[window.]document.getElementById("element-id").style.fontWeight = "font-weight";

Example | 100-900

Example | bold

Example | bolder

Example | lighter

Example | normal

Example | DOM

External

W3C Cascading Style Sheets, level 1

W3C Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification