CSE 154 Examples

Font Weight Property

The Font Weight property can be used to specify how thick a certain text appears.

Description

The font-weight property can be specified in many ways.

  • Normal - The thickness remains normal.
  • Bold - The text shows up as bold.
  • Bolder - The text shows up slightly thicker than bold text.
  • Lighter - The text shows up lighter than normal text.
  • Number - This can be expressed on a scale from 100-900 where 400 is normal text.

Syntax :

                  
                      element {
                        font-weight: lighter;
                      }

                      p {
                        font-size: bolder;
                      }
                  
                

HTML :

CSS :

Live Preview :