Information about cookies on this page

Our website uses cookies to ensure the functionality of the website, to collect and analyze information about the performance and usage of the website. Privacy Policy

  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in
  
  • Courses
    • Discord
    • Twitter
    • Linkedin
    • Facebook
    • Instagram
  • Pricing
  • English
  • Čeština
  • Deutsch
  • Русский
Sign inStart free
  • Courses
  • Pricing

Community

Sign in

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:

Classfont-weight
font-thin100
font-extralight200
font-light300
font-normal400
font-medium500
font-semibold600
font-bold700
font-extrabold800
font-black900

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

  1. 1

    In the class attribute of the h1 heading, replace font-bold with font-extrabold.

  2. 2

    Add the class font-semibold to the "Playful" badge.

Back

7/12

  1. 1. The Color Palette
  2. 2. Shades
  3. 3. Quiz: Shades
  4. 4. Page Colors
  5. 5. Transparent Colors
  6. 6. Font Size
  7. 7. Font Weight
  8. 8. Quiz: Font Weight
  9. 9. Line Height and Alignment
  10. 10. Letter Spacing and Case
  11. 11. Font Family and Underline
  12. 12. Summary
Next

Try it yourself

Do this exercise right here in your browser. No account needed.