Agyan
adda
Run
Reset
Copy
Tailwind CSS Tutorial › Tailwind Typography › Typography utilities
Back to tutorial
Code
Edit, then press Run or Ctrl+Enter
<script src="https://cdn.jsdelivr.net/npm/@tailwindcss/browser@4"></script> <article class="max-w-xl p-6 space-y-3"> <p class="text-sm font-semibold uppercase tracking-widest text-indigo-600">Tutorial</p> <h1 class="text-4xl font-black tracking-tight text-slate-900">Learn Tailwind Typography</h1> <p class="text-lg/8 text-slate-600">Readable text needs a comfortable size, a relaxed line height and good contrast.</p> <p>Links can have a <a href="#" class="underline decoration-sky-500 decoration-2 underline-offset-4 hover:decoration-4">styled underline</a>.</p> <p class="font-mono text-sm bg-slate-100 px-2 py-1 rounded inline-block">font-mono for code</p> <p class="line-clamp-2 text-slate-500 border p-2 rounded">This long description is limited to two lines with line-clamp-2. Any extra text after the second line is hidden and replaced with three dots, which is perfect for blog cards and product listings.</p> </article>
Result