Colors
Learn how to use Tailwind background, text and border colors.
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="space-y-3 p-6">
<div class="bg-blue-600 text-white p-4 rounded-lg">
Blue
</div>
<div class="bg-emerald-600 text-white p-4 rounded-lg">
Emerald
</div>
<div class="bg-amber-400 text-slate-900 p-4 rounded-lg">
Amber
</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.
What is Tailwind CSS?