HTML Tables Padding & Spacing
HTML tables can adjust the padding inside the cells, and also the space between the cells.
HTML tables can adjust the padding inside the cells, and also the space between the cells.
<style>
th, td{
padding: 25px;
}
</style>
<table>
<tr>
<th>srn</th>
<td>1</td>
<td>2</td>
</tr>
<tr>
<th>Name</th>
<td>Alfreds</td>
<td>Devid</td>
</tr>
<tr>
<th>Address</th>
<td>USA</td>
<td>Japan</td>
</tr>
</table>
srn | 1 | 2 |
---|---|---|
Name | Alfreds | Devid |
Address | USA | Japan |
<style>
table{
border-spacing: 25px;
}
</style>
<table>
<tr>
<th>srn</th>
<td>1</td>
<td>2</td>
</tr>
<tr>
<th>Name</th>
<td>Alfreds</td>
<td>Devid</td>
</tr>
<tr>
<th>Address</th>
<td>USA</td>
<td>Japan</td>
</tr>
</table>
srn | 1 | 2 |
---|---|---|
Name | Alfreds | Devid |
Address | USA | Japan |
In this page (written and validated by A. Gawali) you learned about HTML Table Padding and Spacing . What's Next? If you are interested in completing HTML tutorial, your next topic will be learning about: HTML Table colspan and rowspan.
Share On: |