Tables
Tables

Tables

Task 1: Border Collapse

border-collapse
border-separate

Example 1:

<table class="border-collapse border border-slate-500 ...">
<thead>
<tr>
<th class="border border-slate-600 ...">State</th>
<th class="border border-slate-600 ...">City</th>
</tr>
</thead>
<tbody>
<tr>
<td class="border border-slate-700 ...">Indiana</td>
<td class="border border-slate-700 ...">Indianapolis</td>
</tr>
<tr>
<td class="border border-slate-700 ...">Ohio</td>
<td class="border border-slate-700 ...">Columbus</td>
</tr>
<tr>
<td class="border border-slate-700 ...">Michigan</td>
<td class="border border-slate-700 ...">Detroit</td>
</tr>
</tbody>
</table>

Task 2: Border Spacing

Example 2

<table class="border-separate border-spacing-2 border border-slate-500 ...">
<thead>
<tr>
<th class="border border-slate-600 ...">State</th>
<th class="border border-slate-600 ...">City</th>
</tr>
</thead>
<tbody>
<tr>
<td class="border border-slate-700 ...">Indiana</td>
<td class="border border-slate-700 ...">Indianapolis</td>
</tr>
<tr>
<td class="border border-slate-700 ...">Ohio</td>
<td class="border border-slate-700 ...">Columbus</td>
</tr>
<tr>
<td class="border border-slate-700 ...">Michigan</td>
<td class="border border-slate-700 ...">Detroit</td>
</tr>
</tbody>
</table>

Task 3: Table Layout


Reference

https://tailwindcss.com/docs/border-collapse