Search within TutorialsPark

CSS font-weight Property


A specify the weight of the font(i.e the thickness of the character)


Definition and Notes.

1. The CSS font-weight property defines whether the font weight(i.e thickness of the font).

2. The Visual result of each numeric value of font-weight, must be atleast as light as the next lowest number an atleast as heavy as the next highest number.

Syntax:

CSS font-weight property. internetexplorer safari firefox opera chrome

View in Splitscreen»

Code-Editor:

Note-The boldness is assigned relative to the font-weight of parent element, it can be used to add emphasis to text.

Property Values

Value Description
normal To set a normal thickness.Value same as '400'
bold The font-weight is set as bold. Value is same as '700'
bolder The set a thicker font-weight.
lighter To set a ligher font-weight.
100
200
300
400
500
600
700
800
900
Each of the value denotes a weight that is at least as dark as its predecessor. The sequence if from thin to thick.
inherit The value for font-weight is inherited from the parent element.

Specifications

Specs Value
Name font-weight
Value normal | bold | bolder | lighter | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900
Initial Value Normal
Applies to all elements
Javascript syntax object.style.fontWeight="bold"
Inherited Yes
Computed Value Numeric Weight Value.
Browser Support internetexplorer safari firefox opera chrome

Related Examples.