What if you could change your text's boldness with just one small class name?
Why Font weight control in Tailwind? - Purpose & Use Cases
Start learning this pattern below
Jump into concepts and practice - no test required
Imagine you want to make some words in your webpage look thicker or lighter to show importance, so you write CSS styles for each text piece manually.
Changing font thickness manually means writing many CSS rules, remembering exact numbers, and updating multiple places if you want a different look. It's slow and easy to make mistakes.
Tailwind's font weight classes let you quickly apply different thicknesses by adding simple class names like font-bold or font-light. No need to write custom CSS each time.
p { font-weight: 700; } /* bold text */
span { font-weight: 300; } /* light text */<p class="font-bold">Bold text</p> <span class="font-light">Light text</span>
You can easily change text thickness on the fly, making your design clear and consistent without extra CSS hassle.
On a blog, you want headings bold and quotes lighter. Using Tailwind font weight classes, you just add font-bold to headings and font-light to quotes, instantly styling them.
Manual font weight styling is slow and error-prone.
Tailwind classes simplify font weight control with easy-to-remember names.
This makes your text styling faster, consistent, and flexible.
Practice
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]
- Confusing font-thin with font-light
- Choosing font-bold which is thick text
- Thinking font-black is thin
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]
- Using non-existent classes like font-heavy
- Confusing font-bold with font-thick
- Trying font-strong which is invalid
font-semibold?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]
- Thinking font-semibold is very thin
- Confusing it with normal weight
- Assuming it means very thick text
font-bld. What happens?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]
- Expecting Tailwind to throw an error
- Thinking text becomes bold anyway
- Assuming text disappears
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]
- Using incorrect responsive syntax like font-lg:
- Missing colon after lg
- Confusing base and responsive classes
