CSS Grid
Build powerful layouts using Tailwind grid utilities.
Learning approach
Study the Tailwind classes in the example, run the preview, then modify the classes and observe how the design changes.
Tailwind Example
HTML + Tailwind CSS
<div class="grid grid-cols-3 gap-4 p-5">
<div class="p-6 bg-slate-900 text-white rounded-xl">
One
</div>
<div class="p-6 bg-indigo-600 text-white rounded-xl">
Two
</div>
<div class="p-6 bg-emerald-600 text-white rounded-xl">
Three
</div>
</div>
Live Preview
Your Tailwind design will appear here.
Click Run Preview
See the lesson example here.
Test your understanding
Choose the best answer.
Which Tailwind utility creates a flex container?