Trusted answers to developer questions
Trusted Answers to Developer Questions

Related Tags

css
font
weight

What is the font-weight property in CSS?

Educative Answers Team

Grokking Modern System Design Interview for Engineers & Managers

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 400400.
  • Numerical values in the range of 100900100-900: These values represent the amount of weight we intend to assign to the text, where 900900 is the maximum weight.
  • bolder/lighter: makes the font-weight one weight bolder or lighter than its current value.
svg viewer

Implementation

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

RELATED TAGS

css
font
weight
Copyright ©2022 Educative, Inc. All rights reserved

Grokking Modern System Design Interview for Engineers & Managers

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.

Keep Exploring