🚀 Tailwind CSS: The Utility-First Approach

Tailwind CSS is a framework composed of low-level utility classes. Instead of writing a CSS rule like .center-container { display: flex; }, you apply the class flex directly to the HTML tag.

📝 Code Breakdown

<div class="flex justify-center items-center">
    <p class="text-blue-500 text-sm">Pure CSS with a Twist</p>
</div>
ClassCSS Property EquivalentPurpose
flexdisplay: flex;Starts the flexbox context.
justify-centerjustify-content: center;Aligns items horizontally (main axis).
items-centeralign-items: center;Aligns items vertically (cross axis).
text-blue-500color: rgb(59, 130, 246);Sets the text color (requires a shade number).
text-smfont-size: 0.875rem;Sets font size to “small.”

Useful link for practice layout: Grid Garden Flexbox Froggy

Tailwind Fundamentals Layouts & Flex-box Structuring UI