Tailwind Borders & Shadows

Borders, rounded corners and shadows.

✍️ 3 exercises + code challenge in this lesson
  • Borders: border, border-2, border-t-4, border-dashed
  • Rounded: rounded, rounded-xl, rounded-full
  • Shadows: shadow-sm, shadow-lg, shadow-2xl
  • Rings (outlines): ring-2 ring-cyan-400

Key Takeaways: Tailwind Borders & Shadows

Mastering Tailwind Borders & Shadows helps you write clean and reliable Tailwind CSS code. Follow standard conventions, test edge cases, and keep logic simple. Try running the code example below and complete the exercises to build confidence.

Tailwind Borders & Shadows Code Example

Tailwind CSS
<script src="https://cdn.tailwindcss.com"></script>

<div class="p-8 flex gap-6 bg-slate-50">
  <div class="p-4 border-2 border-dashed border-cyan-500 rounded-xl">Dashed</div>
  <div class="p-4 bg-white rounded-2xl shadow-lg">Shadow</div>
  <div class="p-4 bg-white rounded-full ring-4 ring-cyan-300">Ring</div>
</div>
Free sign-in required · Google login available

Tailwind Borders & Shadows Practice Exercises

Check what you learned in “Tailwind Borders & Shadows”.

/ 3 solved
Fill in the blank

Make the corners fully round (a circle or pill).

<img class="">
✓ Correct! Not quite. Try again.
Multiple choice

Which class adds a large shadow?

✓ Correct! Not quite. Try again.
Code challenge

Give the card rounded-xl and shadow-lg.

Write the code in the live editor. Your answer is checked automatically.

Free sign-in required · Google login available

to save your exercise progress.
Finished this lesson?
Mark it complete to track your progress.

Stuck on something?

Ask the community in the CodesInTech forum.

Need a developer?

Learning on your own is great — and when you need professional help, our team builds custom software, websites and mobile apps for clients worldwide.

Explore Our Services