← Tailwind CSS & Bootstrap learning path
Tailwind CSS & Bootstrap · Module 5 of 10

Tailwind setup and basics

Install Tailwind and learn its core utility classes.

📖 Key ideas

  1. Install with Vite: npm install tailwindcss @tailwindcss/vite, then @import "tailwindcss";.
  2. Spacing: p-4 (padding), m-2 (margin), gap-6.
  3. Text: text-xl, font-bold, text-gray-700.
  4. Colours: bg-emerald-600, text-white.
  5. Tailwind only outputs classes you actually use.
💡 Real-life example: Tailwind is a spice rack: a pinch of p-4, a dash of text-lg, and the dish is ready.
p-4Padding of 1rem
text-xlExtra-large text size
bg-blue-600Blue background shade 600
PurgingRemoving unused classes from output