Lesson 24 of 3080%

(Progress persistence is disabled until Phase 9)

Tailwind CSS
Beginner

Borders

Adding and styling borders.

To add a border, you must first apply the border class. Then you can style it.

  • border (adds 1px border)
  • border-2, border-4 (border width)
  • border-red-500 (border color)
  • border-dashed, border-dotted (border style)
<div class="border-2 border-dashed border-blue-500 p-4">
  Dashed Box
</div>
Try It Yourself

Lesson Progress

Ready to practise?

Apply what you learned with a hands-on challenge.

Practise This Topic