Chapter practice task
Task: Install Tailwind and build a features section with flex and grid utilities
- Set up Tailwind CSS with Vite or the CLI.
- Build a hero with spacing, typography and color utilities.
- Build a three-column features grid that becomes one column on mobile.
- Build a navbar with flexbox utilities.
By the end of this chapter
- You have a working Tailwind setup
- You can read and write Tailwind utility classes confidently
- You can lay out pages with flex and grid utilities
Quick answers for this chapter
Does Tailwind need Node.js?
For real projects, yes (with Vite, the CLI or a framework). A browser CDN build exists for quick experiments.
Will my CSS file be huge?
No. Tailwind only generates the classes you use, so production CSS is usually small.
Is Tailwind v4 different from v3?
Yes. v4 uses CSS-first configuration with @import "tailwindcss" and @theme instead of a JavaScript config file by default.