Table >> Spacing >> Cell Spacing
|
|
Cell Spacing
We use cell spacing to prevent the table from being crowded, we add spaces between cells so it may look wider and not crowded.
To apply cell spacing on your table, simply add this property on your <table> tag, cellspacing=""
Take a look at the examples below:
<table border=1 cellspacing=0>
<tr>
<td>1
<td>2
<td>3
<tr>
<td>4
<td>5
<td>6
<tr>
<td>7
<td>8
<td>9
</table>
|
No Cell Spacing
Border = 1
|
|
<table border=1 cellspacing=5>
<tr>
<td>1
<td>2
<td>3
<tr>
<td>4
<td>5
<td>6
<tr>
<td>7
<td>8
<td>9
</table>
|
Cell Spacing = 5
Border = 1
|
|
<table border=1 cellspacing=10>
<tr>
<td>1
<td>2
<td>3
<tr>
<td>4
<td>5
<td>6
<tr>
<td>7
<td>8
<td>9
</table>
|
Cell Spacing = 10
Border = 1
|
| | | |
|
|
|
|