Example

A simple font-weight property example:

Laboratory

description & Usage

To determine whether the font size of the text is thick or thin, we use the font-weight property.

Informations

# Description
Default Value normal
Inherited yes
Animatable yes
Version CSS1
JavaScript syntax object.style.fontWeight="bold"

Browser compatibility and Support

# Chrome Edge Firefox Safari Opera
font-weight

Syntax

Values

Values Description
normal Specifies normal text.
bold Defines bold text.
bolder Defines more colorful texts.
lighter Specifies lighter text.
100 200 300 400 500 600 700 800 900 defines thick and thin texts; 400 is normal mode and 700 is full color.
initial Adds this value to its default property.
inherit It inherits this value from its parent tag.