Preparing your workspace
Tailwind CSS is a utility-first CSS framework that provides small reusable utility classes for styling HTML and component-based interfaces.
Traditional CSS often requires creating custom class names and writing separate CSS rules for each component. Tailwind takes a different approach by providing many small utility classes for common properties such as spacing, colors, typography, layout, borders, and responsive behavior. You combine these classes directly in your markup to describe the design. Tailwind still produces normal CSS in the final application; the main difference is how developers author and organize styles.
A course card can use utility classes for padding, rounded corners, shadows, typography, spacing, and hover behavior without creating a separate custom CSS file for the card.
<div class="rounded-xl border bg-white p-6 shadow-sm">
<h2 class="text-xl font-semibold">React Course</h2>
<p class="mt-2 text-gray-600">Learn React step by step.</p>
<button class="mt-4 rounded-lg bg-blue-600 px-4 py-2 text-white hover:bg-blue-700">
Start Course
</button>
</div>The page displays a styled course card with rounded corners, spacing, a title, description, and a blue button.