How to change font weight with CSS

The font weight defines the thickness of your font. You can use this to highlight an important piece of text or change the style of headlines. Different fonts supports different styles so you may not be able to use all values on a specific font.

font-weight: bold;

This would make the font bold and apply a thicker style to the font. You can also use values like light and normal. If you need more control over the font weight you can use values from 100 to 900. The lower the value the lighter the font.

font-weight: 300;

This would be a quite light font whereas 900 would be to thickest available font style. If a font does not have all styles available 900 and 700 could output the same styling.

  Written by: Michael from Beginnrtuts.com     07-09-2022     Written in: CSS tutorials

Leave a Reply

Your email address will not be published. Required fields are marked *