Font Weight & Style in Tailwind CSS
Font weight and font style are the two most direct ways to add
typographic emphasis. Tailwind's
font-* weight utilities span
the full 9-step numeric scale — from
font-thin (100) to
font-black (900) — and the
italic /
not-italic utilities control
the slant axis. Together they form the foundation of typographic
hierarchy: bold headings command attention, semibold buttons feel
clickable, medium-weight labels read cleanly, and italic text
signals quotations, definitions, or gentle emphasis.
font-thin (100)
through font-black (900)
font-semibold for buttons and
font-bold for headings
italic and reset it with
not-italic
text-5xl font-extrabold leading-none
font-normal md:font-semibold
What is Font Weight & Style? — The Emphasis Axes
Font weight controls how thick or thin character
strokes are rendered, on a numeric scale from 100 (hairline) to
900 (ultra-heavy). Each step has a named Tailwind class that maps
to the CSS
font-weight property.
Font style controls whether the text is upright
(normal) or slanted (italic). The browser can also synthesise a
fake oblique on any font, but true italic glyphs — designed by the
type foundry — always look better. Together, weight and style are
your primary tools for typographic hierarchy without changing font
size.
font-thin,
font-extralight,
font-light. Use for
decorative large-scale display text, hero section subtitles,
and elegant editorial designs. At body text sizes, weights
below 300 can be difficult to read — use only above 24px.
font-normal (400) is the
browser default — all body text.
font-medium (500) adds a
subtle weight increase ideal for form labels, navigation
links, table column headers, and text that should feel
slightly more prominent without being bold.
font-semibold (600) is
the modern standard for button text, card titles, and active
navigation items.
font-bold (700) is the
standard for headings (h1–h3), strong emphasis,
and important labels. These are the two most-used weight
classes on any project.
font-extrabold (800) and
font-black (900) for
maximum impact — hero banners, landing page headlines,
marketing copy, and brand statements that must command
immediate attention. Use sparingly; too much heavy weight
creates visual noise.
Font Weight — All 9 Utilities
Every font-{name} weight class
maps to a specific numeric
font-weight value. The names
follow the CSS font weight specification. Most design work uses
three weights: font-normal for
body text, font-semibold for
UI components, and
font-bold for headings.
<p>,
<span>, and most elements unless
overridden. Use for all primary body text. Also use as a reset
class — font-normal overrides any bold or
semibold inherited from a parent element.
<b>,
<strong>, and heading elements by default.
Use for h1–h3, section titles, and any text that must clearly
dominate its surrounding content. The most commonly used
weight class for headings.
font-bold isn't dramatic
enough and you want to make a strong visual statement without
going to maximum weight.
<!-- font-thin: hero decorative — large size required -->
<h1 class="text-7xl font-thin tracking-widest text-white uppercase">
Studio
</h1>
<!-- font-light: hero subtitle -->
<p class="text-2xl font-light text-gray-400 leading-relaxed">
Crafted with care, shipped with speed.
</p>
<!-- font-normal: standard body text -->
<p class="text-base font-normal text-gray-700 dark:text-gray-300 leading-relaxed">
Body paragraph at default browser weight.
</p>
<!-- font-medium: form label -->
<label class="block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1">
Email address
</label>
<!-- font-semibold: button + card title -->
<button class="text-sm font-semibold px-5 py-2.5 bg-cyan-500 text-white rounded-lg">
Get started
</button>
<h3 class="text-lg font-semibold text-gray-900 dark:text-white">Feature title</h3>
<!-- font-bold: section heading -->
<h2 class="text-3xl font-bold text-gray-900 dark:text-white leading-tight">
Everything you need
</h2>
<!-- font-extrabold / font-black: hero h1 -->
<h1 class="text-5xl md:text-7xl font-extrabold leading-none
tracking-tight text-white">
Build beautiful UIs
</h1>
<!-- font-normal as a reset: removes inherited bold -->
<strong class="font-normal">Resets to 400 even inside a <strong> tag</strong>
Font Style — italic & not-italic
Tailwind provides two font style utilities.
italic sets
font-style: italic — the
browser either uses the font's dedicated italic glyphs (if
available) or applies a synthetic slant.
not-italic sets
font-style: normal — use it to
remove the automatic italic that browsers apply to
<em> and
<i> elements when you
want the text to appear upright.
<em>, quotations (<q>,
<blockquote>), definitions, titles of
works, and gentle emphasis within a paragraph.
<em>, <i>,
<cite>, and <dfn> all
render italic by default. Add not-italic when you
want the semantic meaning but not the visual slant — e.g. a
<cite> element styled as a badge, or an
<em> used for screen-reader emphasis only.
font-style: oblique as a third option — a
mechanically slanted version of the regular font, different
from true italic. Tailwind does not ship an oblique class but
you can use the arbitrary value syntax:
font-[style:oblique_15deg] for the rare cases
where oblique is needed.
<!-- italic: pull quote -->
<blockquote class="italic text-xl font-light text-gray-600 dark:text-gray-400
border-l-4 border-amber-400 pl-6 py-2">
"Design is not just what it looks like. Design is how it works."
</blockquote>
<!-- italic: em emphasis inside a paragraph -->
<p class="text-base text-gray-700 dark:text-gray-300 leading-relaxed">
The class <em class="italic font-medium">font-semibold</em> is the go-to for button text.
</p>
<!-- italic: film/book title cite -->
<p class="text-sm text-gray-500">
As seen in <cite class="italic">The Design of Everyday Things</cite>
</p>
<!-- not-italic: reset browser-default italic on em -->
<p class="text-sm text-gray-700">
Status: <em class="not-italic font-semibold text-green-600">Active</em>
<!-- Semantic em, but rendered upright as a status badge -->
</p>
<!-- italic: definition term -->
<dl>
<dt class="font-semibold text-gray-900 dark:text-white">Leading</dt>
<dd class="italic text-sm text-gray-500 dark:text-gray-400 ml-4">
The vertical space between lines of text, from baseline to baseline.
</dd>
</dl>
<!-- Combine italic + weight: italic caption -->
<figcaption class="italic font-light text-xs text-gray-400 mt-2 text-center">
Figure 1 — Component architecture overview
</figcaption>
Combining Weight, Style & Size — Production Patterns
Font weight and style work best when combined with the type scale from Chapter 23. The real skill is knowing which weight fits which role in the UI hierarchy. Here are the six most common weight+size combinations used in production Tailwind projects, each solving a specific design problem.
<!-- Full landing page typographic hierarchy -->
<section class="h-dvh flex flex-col items-center justify-center text-center px-4">
<!-- Eyebrow label: xs + medium + uppercase tracking -->
<span class="text-xs font-medium tracking-widest uppercase text-cyan-400 mb-4">
New — Tailwind CSS v4 is here
</span>
<!-- Hero h1: extrabold + large + none leading -->
<h1 class="text-4xl md:text-6xl lg:text-7xl font-extrabold leading-none
tracking-tight text-white mb-6 max-w-4xl">
Build beautiful UIs faster
</h1>
<!-- Subtitle: light + relaxed leading -->
<p class="text-lg md:text-xl font-light leading-relaxed text-gray-400
max-w-2xl mb-10">
A utility-first CSS framework that makes building beautiful,
responsive interfaces effortless.
</p>
<!-- CTA buttons: semibold -->
<div class="flex gap-4 flex-wrap justify-center">
<a href="#" class="px-6 py-3 bg-cyan-500 text-white text-sm font-semibold
rounded-xl hover:bg-cyan-400 transition">Get started free</a>
<a href="#" class="px-6 py-3 border border-gray-600 text-gray-300
text-sm font-semibold rounded-xl hover:border-gray-400 transition">View docs</a>
</div>
</section>
<!-- Card with full weight hierarchy -->
<div class="bg-gray-800 rounded-2xl p-6 flex flex-col gap-3">
<span class="text-xs font-semibold uppercase tracking-wide text-cyan-400">Featured</span>
<h3 class="text-xl font-semibold text-white">Tailwind CSS Masterclass</h3>
<p class="text-sm font-normal text-gray-400 leading-relaxed">
From basics to production-ready layouts in 45 focused chapters.
</p>
<p class="text-xs font-medium text-gray-500">45 chapters · 10 hours · Beginner–Advanced</p>
<button class="mt-auto text-sm font-semibold text-cyan-400 hover:text-cyan-300 self-start">
Enroll now →
</button>
</div>
Responsive & Variable Font Patterns
All font weight and style utilities accept responsive prefixes and dark mode variants. The most common responsive pattern is making text heavier on desktop where larger sizes can support more visual weight. Variable fonts (Inter, Plus Jakarta Sans, Nunito) unlock the full 100–900 range continuously — with a single font file that's often smaller than loading several static weights.
<!-- Responsive weight: lighter on mobile, heavier on desktop -->
<h2 class="text-2xl font-bold md:font-extrabold text-gray-900 dark:text-white">
Section title — bold mobile, extrabold desktop
</h2>
<!-- Responsive italic: italic emphasis on desktop only -->
<p class="text-base font-normal md:italic text-gray-700 dark:text-gray-300">
Italic only on md+ (where the design needs emphasis)
</p>
<!-- Dark mode weight change -->
<p class="text-sm font-medium dark:font-semibold text-gray-700 dark:text-gray-200">
Slightly heavier in dark mode (lighter backgrounds carry weight differently)
</p>
/* Setting up Inter as a variable font in tailwind.config.js */
/* Google Fonts URL for Inter with full weight range */
<!-- In <head>: -->
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@100..900&display=swap"
rel="stylesheet">
<!-- The "100..900" syntax requests the full variable font range -->
/* tailwind.config.js */
const defaultTheme = require('tailwindcss/defaultTheme');
module.exports = {
theme: { extend: { fontFamily: {
sans: ['Inter', ...defaultTheme.fontFamily.sans],
}}}
};
<!-- Now all 9 weights are available in font-sans -->
<h1 class="font-thin">100</h1>
<h1 class="font-extralight">200</h1>
<h1 class="font-light">300</h1>
<h1 class="font-normal">400</h1>
<h1 class="font-medium">500</h1>
<h1 class="font-semibold">600</h1>
<h1 class="font-bold">700</h1>
<h1 class="font-extrabold">800</h1>
<h1 class="font-black">900</h1>
wght@100..900 in the Google Fonts URL and get every
Tailwind weight class working out of the box, often in a smaller
total file size than loading three or four static weights.
Quick Reference — Font Weight & Style
| Class | CSS Property | Notes |
|---|---|---|
font-thin |
font-weight: 100 |
Hairline — decorative, large display only |
font-extralight |
font-weight: 200 |
Elegant large text, luxury branding |
font-light |
font-weight: 300 |
Hero subtitles, intro text ★ |
font-normal |
font-weight: 400 |
Body text default + reset class ★★ |
font-medium |
font-weight: 500 |
Form labels, nav, secondary emphasis ★★ |
font-semibold |
font-weight: 600 |
Buttons, card titles, active items ★★ |
font-bold |
font-weight: 700 |
Headings h1–h3, <strong> default ★★ |
font-extrabold |
font-weight: 800 |
Hero h1, impact statements ★ |
font-black |
font-weight: 900 |
Maximum weight — display only |
italic |
font-style: italic |
Quotes, em, cite, definitions ★★ |
not-italic |
font-style: normal |
Resets em/i browser italic ★ |
sm:font-bold |
At ≥640px | Responsive weight ★ |
md:font-semibold |
At ≥768px | Common responsive pattern ★ |
dark:font-semibold |
Dark mode | Weight adjustment for dark mode |
md:italic |
At ≥768px | Responsive italic |
md:not-italic |
At ≥768px | Responsive italic reset |
★ = commonly used • ★★ = used on virtually every project
-
9 weight steps —
font-thin(100) throughfont-black(900). Each maps directly to a CSS numericfont-weightvalue. The weight is only visible if the loaded font has that variant — use a variable font like Inter for the full range. -
The three everyday weights —
font-normal(400) for all body text;font-semibold(600) for buttons, card titles, and active navigation;font-bold(700) for headings h1–h3. These three weights cover 90% of all production UI typography needs. - font-medium (500) — The subtle emphasis weight. Use for form labels, table column headers, and secondary navigation items where you want a slight priority increase without the assertiveness of bold. Many design systems use 500 as their label weight.
-
italic — Sets
font-style: italic. Use for quotations, citations, definitions, book/film titles, and gentle emphasis within a paragraph. Best with fonts that include a true italic variant rather than relying on browser synthesis. -
not-italic — Resets to
font-style: normal. Essential for overriding the browser's automatic italic on<em>,<i>, and<cite>elements when you need the semantic role but not the visual slant. -
Variable fonts unlock the full spectrum — Load
Inter with
wght@100..900and every Tailwind weight class works precisely, in one font file often smaller than three or four static weights combined. The browser interpolates any weight on the 100–900 axis in real time. -
Responsive weights — All weight and style
utilities accept breakpoint prefixes:
font-bold md:font-extrabold,not-italic md:italic. The most common pattern is adding more weight on desktop where larger font sizes can support heavier strokes. -
Next chapter — Text Alignment covers
text-left,text-center,text-right,text-justify, and responsive alignment patterns for headings and multi-column layouts.
Quick Check — Questions & Answers
Test your understanding. Click a question to reveal the answer.
font-bold sets
font-weight: 700 — the standard heading
weight. It is the weight browsers apply to
<b>, <strong>, and
heading elements by default. It is the correct choice for
all h1–h3 headings, section titles, and any text that
needs to clearly dominate its surrounding body text.
font-extrabold sets
font-weight: 800 — significantly heavier,
used for maximum visual impact in hero sections, product
launch headings, and marketing statements where
font-bold doesn't feel dramatic enough. The
strokes are noticeably thicker, creating more contrast
against light backgrounds. Use it when you need the
heading to command attention from across the page — e.g.,
a large-type hero h1 paired with text-5xl or
larger.
font-semibold (600) is for interactive UI components — buttons, card titles, active navigation links, dropdown item labels, badge text, and tab labels. At small sizes (text-sm, text-base), semibold gives a clean, assertive presence without feeling heavy or aggressive. Major design systems (Material Design 3, Apple HIG) use 600 as the standard "emphasis" weight for UI components.
font-bold (700) is for typographic headings — h1, h2, h3, section titles, and any text that needs to establish a clear visual hierarchy above the body content. At heading sizes (text-2xl and above), bold creates the contrast needed to clearly separate the heading from the paragraph below it. A useful rule: if it's interactive (a button, a link, a label), use semibold. If it's a heading in a text hierarchy, use bold.
italic sets font-style: italic.
If the font has dedicated italic glyphs (true italic), the
browser renders them — these are purpose-designed
letterforms, not just slanted versions. Use for:
quotations in blockquotes,
<em> emphasis where you want the visual
slant, titles of works (books, films, albums), inline
definitions, and figure captions where italic convention
is appropriate.
not-italic sets
font-style: normal and is most commonly used
to override the browser's automatic italic styling on
semantic elements. Browsers make <em>,
<i>, <cite>, and
<dfn> italic by default. When you use
these elements for their semantic meaning but want them to
appear upright — such as an <em> styled
as a green "Active" status badge — add
not-italic to remove the slant while
preserving the accessibility semantics.
A font-weight class only works if the loaded font includes
a variant for that weight. For example, system fonts like
Segoe UI (Windows) typically only ship 300, 400, and 700
weights. If you apply font-thin (100) or
font-medium (500) with Segoe UI, the browser
cannot find an exact match and falls back to the nearest
available weight — 100 falls back to 400, and 500 to
either 400 or 700, depending on the browser's weight
mapping rules.
The fix is to load a font that includes the weight you
need. For the complete 100–900 range, use a variable font:
Google Fonts Inter with
wght@100..900 supports every Tailwind weight
class. Standard (non-variable) Google Fonts require
explicitly requesting each weight in the URL:
Inter:wght@400;500;600;700 — adding those
four weights is enough for most UI designs.
A variable font is a single font file that uses internal
axes to allow infinite variation along a defined range.
The weight axis (wght) is the most common —
it lets a single Inter variable font file support any
weight from 100 to 900 continuously, rather than requiring
separate Inter-Regular.woff2, Inter-SemiBold.woff2, and
Inter-Bold.woff2 files.
For Tailwind projects, this means all 9 weight classes
work precisely with a single font load. Variable fonts are
also usually smaller in total size than loading three or
four separate static weights. To load Inter as a variable
font from Google Fonts, use the range syntax in the URL:
family=Inter:wght@100..900. The
..900 part is what triggers the variable font
download. This unlocks all Tailwind weight classes —
font-thin through font-black —
without any additional configuration.
MCQ Quiz — Test Yourself
Select the best answer. Correct answers are revealed on click.
font-weight: 700?
<em>
element's default italic rendering back to upright?
Rate Us on Google
Join Our Learning Community
Connect with thousands of learners, get daily tips, ask questions and stay updated with new tutorials.