Font weight control helps you make text look lighter or bolder. It changes how thick or thin the letters appear.
Font weight control in Tailwind
Start learning this pattern below
Jump into concepts and practice - no test required
or
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Introduction
Syntax
Tailwind
font-thin font-extralight font-light font-normal font-medium font-semibold font-bold font-extrabold font-black
Each class changes the font weight from very thin to very bold.
Use these classes on any text element like <p>, <h1>, or <span>.
Examples
Tailwind
<p class="font-thin">This text is very thin.</p>Tailwind
<h1 class="font-bold">This heading is bold.</h1>Tailwind
<span class="font-medium">Medium weight text here.</span>Sample Program
This page shows different font weights using Tailwind CSS classes. Each paragraph uses a different font weight class to demonstrate how text thickness changes visually.
Tailwind
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1" /> <title>Font Weight Control Example</title> <script src="https://cdn.tailwindcss.com"></script> </head> <body class="p-6"> <h1 class="font-black text-3xl mb-4">Font Weight Examples</h1> <p class="font-thin mb-2">This text is very thin.</p> <p class="font-light mb-2">This text is light.</p> <p class="font-normal mb-2">This text is normal weight.</p> <p class="font-semibold mb-2">This text is semi-bold.</p> <p class="font-bold mb-2">This text is bold.</p> <p class="font-extrabold mb-2">This text is extra bold.</p> <p class="font-black">This text is the heaviest black font weight.</p> </body> </html>
Important Notes
Font weight classes work best with fonts that support multiple weights.
Use font-normal to reset to normal weight if needed.
Combining font weight with size and color helps create clear text hierarchy.
Summary
Font weight control changes how thick or thin text looks.
Tailwind provides easy classes from font-thin to font-black.
Use these classes to make your text clear and visually appealing.
Practice
1. Which Tailwind class makes text appear very thin?
easy
Solution
Step 1: Understand font weight scale in Tailwind
Tailwind uses classes likefont-thinfor very thin text andfont-blackfor very thick text.Step 2: Identify the class for very thin text
font-thinis the class that makes text very thin, thinner thanfont-light.Final Answer:
font-thin -> Option DQuick Check:
Thin text = font-thin [OK]
Hint: Thin text uses font-thin class in Tailwind [OK]
Common Mistakes:
- Confusing font-thin with font-light
- Choosing font-bold which is thick text
- Thinking font-black is thin
2. Which of these is the correct Tailwind class to make text bold?
easy
Solution
Step 1: Recall Tailwind font weight classes
Tailwind uses specific class names likefont-boldfor bold text, not generic words like heavy or thick.Step 2: Identify the correct class for bold text
font-boldis the official class to make text bold in Tailwind.Final Answer:
font-bold -> Option BQuick Check:
Bold text = font-bold [OK]
Hint: Bold text always uses font-bold class [OK]
Common Mistakes:
- Using non-existent classes like font-heavy
- Confusing font-bold with font-thick
- Trying font-strong which is invalid
3. What font weight will the text have with this class:
font-semibold?medium
Solution
Step 1: Understand Tailwind font weight scale
Classes go from thin, light, normal, medium, semibold, bold, to black.font-semiboldis between medium and bold.Step 2: Match
font-semiboldto weight descriptionfont-semiboldmeans medium-bold text, stronger than normal but not the thickest.Final Answer:
Medium-bold text -> Option AQuick Check:
font-semibold = medium-bold [OK]
Hint: Semibold means medium-bold weight in Tailwind [OK]
Common Mistakes:
- Thinking font-semibold is very thin
- Confusing it with normal weight
- Assuming it means very thick text
4. You want to make text bold but accidentally write
font-bld. What happens?medium
Solution
Step 1: Check if
font-bldis a valid Tailwind classfont-bldis not a valid Tailwind class, so it won't apply any font weight style.Step 2: Understand how invalid classes behave
Invalid classes are ignored by Tailwind CSS, so the text keeps its default normal weight.Final Answer:
Text stays normal weight -> Option AQuick Check:
Invalid class ignored = normal weight text [OK]
Hint: Invalid classes do nothing; text stays default weight [OK]
Common Mistakes:
- Expecting Tailwind to throw an error
- Thinking text becomes bold anyway
- Assuming text disappears
5. You want to style a heading with very thick text but also make it responsive: thin on small screens and black on large screens. Which Tailwind classes do you use?
hard
Solution
Step 1: Identify base and responsive classes
Base class applies to all screen sizes; responsive prefixes likelg:apply styles on large screens.Step 2: Check correct syntax for responsive font weight
font-thinsets thin text by default;lg:font-blackapplies very thick text on large screens.Step 3: Eliminate incorrect options
Options withfont-lg:font-blackorlg-font-blackare invalid syntax in Tailwind.Final Answer:
font-thin lg:font-black -> Option CQuick Check:
Responsive prefix = lg:font-black [OK]
Hint: Use lg: prefix for large screen styles [OK]
Common Mistakes:
- Using incorrect responsive syntax like font-lg:
- Missing colon after lg
- Confusing base and responsive classes
