CSS Table Width

CSS can control table width.

Preview

Code

<style>
table{
width:100%;
border-collapse:collapse;
}

td, th{
border:1px solid #e5e7eb;
padding:8px;
}
</style>

<table>
<tr><th>Name</th><th>Age</th></tr>
<tr><td>Alice</td><td>24</td></tr>
<tr><td>Bob</td><td>28</td></tr>
</table>

More CSS Tables Examples (8)