Web4College

CSS font-weight property

src

Description

CSS font-weight property defines the weight of fonts with their darkness and stroke thickness.

There is a scale of font-weight i.e. 100 to 900. As the value increases from 100 to 900, the font weight shifts from light to bold.

Syntax

font-weight : value | normal | bold | bolder | lighter

Property values

normalDefault

normal represents normal text. It is same as 400.

font-weight: normal;
Try it

bold

represents bold text. It is same as 600.

font-weight: bold;
Try it

bolder

It represents bolder font-weight than the inherited value.

font-weight: bolder;
Try it

lighter

It represents lighter font weight than the inherited value.

font-weight: lighter;
Try it

value

400

400 value represents a light weight font.

font-weight: 400;
Try it

value

600

600 value represents a bold weight font.

font-weight: 600;
Try it

Applicable to

It applies to all elements