Core Tailwind · 8 min read · Beginner
Spacing Scale, Sizing & Visual Hierarchy
Master Tailwind's 4px spacing rhythm (`p-4`, `gap-6`), container widths, and readable typographic scale.
What you'll learn
- Use `max-w-*` and `mx-auto` for comfortable reading line lengths
- Combine `font-extrabold tracking-tight` on headings with `leading-relaxed` on body copy
- Use `min-h-11` (`44px`) for thumb-friendly mobile buttons
Overview
Master Tailwind’s 4px spacing rhythm (p-4, gap-6), container widths, and readable typographic scale.
Code Example
<article class="mx-auto max-w-3xl px-6 py-12">
<p class="text-xs font-bold uppercase tracking-widest text-blue-600">Guide</p>
<h1 class="mt-2 text-4xl font-extrabold tracking-tight text-slate-900">Clean UI Hierarchy</h1>
<p class="mt-4 text-base leading-relaxed text-slate-600">Consistent spacing makes interfaces effortless to scan.</p>
</article>
Key Takeaways
- Use
max-w-*andmx-autofor comfortable reading line lengths - Combine
font-extrabold tracking-tighton headings withleading-relaxedon body copy - Use
min-h-11(44px) for thumb-friendly mobile buttons
Quick Check
Check Your Understanding
Score: 0 / 1
1. How many pixels is `p-6` in Tailwind's default spacing scale?
Study Workspace
Finished this lesson?
Your progress is saved locally in your browser, no account needed.