JSFiddle - React, Tailwind, and code Playground
HTML
<title>TABLE RESPONSIVE</title>
<body>
<table>
<tr>
<td>Project</td>
<td>Generic Family</td>
</tr>
<tbody>
<tr>
<td>Year</td>
<td>1997</td>
</tr>
<tr>
<td>Role</td>
<td>Small Child #2</td>
</tr>
</tbody>
</table>
</body>
</html>
CSS
/*
Generic Styling, for Desktops/Laptops
*/
table {
width: 100%;
border-collapse: collapse;
}
/* Zebra striping */
tr:nth-of-type(odd) {
background: #eee;
}
th {
background: #333;
color: white;
font-weight: bold;
}
td, th {
padding: 6px;
border: 1px solid #ccc;
text-align: left;
}