Related Tags

css
font
weight

What is the font-weight property in CSS?

Ace your System Design Interview and take your career to the next level. Learn to handle the design of applications like Netflix, Quora, Facebook, Uber, and many more in a 45-min interview. Learn the RESHADED framework for architecting web-scale applications by determining requirements, constraints, and assumptions before diving into a step-by-step design process.

The font-weight property is meant for setting the weight (boldness) of the font. The default font-weight is set as normal. Other values that can be used for font-weight are:

• bold: makes the text bold by setting its font-weight value to $400$.
• Numerical values in the range of $100-900$: These values represent the amount of weight we intend to assign to the text, where $900$ is the maximum weight.
• bolder/lighter: makes the font-weight one weight bolder or lighter than its current value.

Implementation

The following code sets different a font-weight for each line of the text:

RELATED TAGS

css
font
weight