Skip to main content

Tailwind CSS Font Sizes

Complete Tailwind v4 typography scale reference.
Click any row to copy the class name.

Live Preview

Quick Reference

ClassFont SizePixelsLine Height
text-xs0.75rem12px1.333
text-sm0.875rem14px1.429
text-base1rem16px1.5
text-lg1.125rem18px1.556
text-xl1.25rem20px1.4
text-2xl1.5rem24px1.333
text-3xl1.875rem30px1.2
text-4xl2.25rem36px1.111
text-5xl3rem48px1
text-6xl3.75rem60px1
text-7xl4.5rem72px1
text-8xl6rem96px1
text-9xl8rem128px1

Usage Examples

Headings

<h1 class="text-4xl">Page Title</h1>
<h2 class="text-2xl">Section</h2>
<h3 class="text-xl">Subsection</h3>

Body Text

<p class="text-base">Body text</p>
<p class="text-sm">Small text</p>
<span class="text-xs">Caption</span>

Responsive

<h1 class="text-2xl md:text-4xl lg:text-5xl">
  Responsive Title
</h1>

Custom Line Height

<p class="text-lg leading-relaxed">
  Custom line height
</p>

About Tailwind Font Sizes

Tailwind v4 uses a modular type scale with 13 sizes from text-xs (12px) to text-9xl (128px). Each size includes an optimized line-height for readability.

For custom sizes, use arbitrary values: text-[17px] or text-[1.0625rem]

Override line-height with leading utilities: leading-tight, leading-normal, leading-relaxed

Looking for the full Tailwind font-size utility reference? Tailwind Font Size Reference →