Font Weight
The weight of the letters (font-weight) is set by the classes font- followed by the name of a weight. You know font-bold; here are all of them:
| Class | font-weight |
|---|---|
font-thin | 100 |
font-extralight | 200 |
font-light | 300 |
font-normal | 400 |
font-medium | 500 |
font-semibold | 600 |
font-bold | 700 |
font-extrabold | 800 |
font-black | 900 |
The ones you'll use most are font-normal for ordinary text, font-medium and font-semibold for text that should stand out a little, and font-bold or font-extrabold for headings. As you know from the CSS course, a font only looks different in the weights it really has. Tailwind uses the system font of the device (for example Segoe UI on Windows and San Francisco on a Mac), which has many weights, so you'll usually see the difference.
We'll make the name even bolder and give the small text of the badge a little more weight, so that it's crisp. Just like with sizes, replace font-bold, don't add a second weight.
Instructions
In the class attribute of the h1 heading, replace font-bold with font-extrabold.
Add the class font-semibold to the "Playful" badge.
Start programming for free
6/10