Lesson 2 of 16

Typography Utilities

Tailwind Typography

Text size scale: text-xs, text-sm, text-base, text-lg, text-xl, text-2xl, text-3xl, text-4xl, text-5xl

Font weight: font-thin (100) through font-black (900):

  • font-light (300)
  • font-normal (400)
  • font-medium (500)
  • font-semibold (600)
  • font-bold (700)
  • font-extrabold (800)

Text color: text-gray-900, text-blue-600, text-red-500, etc.

Text alignment: text-left, text-center, text-right, text-justify

Line height: leading-none, leading-tight, leading-normal, leading-relaxed, leading-loose

Letter spacing: tracking-tight, tracking-normal, tracking-wide, tracking-wider

<h1 class="text-3xl font-bold text-gray-900">Title</h1>
<p class="text-base text-gray-600 leading-relaxed">Body text</p>
<p class="text-sm text-gray-400 tracking-wide">Caption</p>

Your Task

Create a heading with font-bold, a paragraph with font-semibold, and a smaller text with text-gray styling.

Tailwind preview loading...
Loading...
Click "Run" to execute your code.