I've created a table, but I'm facing an issue where the space between two elements is too large when there are multiple items in the loop. How can I decrease the spacing between these elements?
<table width="100%" height="280" border="1" style="border-collapse: collapse;border-color: rgb(10, 10, 10);empty-cells: hide;">
<thead>
<th style="font-size: 12px;" width="80">Sr</th>
<th style="font-size: 12px;" width="400">Description of Goods</th>
<th style="font-size: 12px;" width="150">HSN</th>
<th style="font-size: 12px;" width="130">Qty</th>
<th style="font-size: 12px;" width="130">Unit</th>
<th style="font-size: 12px;" width="130">Rate (₹)</th>
<th style="font-size: 12px;" width="150">Amount (₹)</th>
</thead>
<tbody>
<?php $ctr =0; foreach($datasdetails as $data){ $ctr++; ?>
<tr>
<td id="t01" style="text-align: center;font-size: 12px;font-size: 12px; vertical-align: top;">
<?php echo $ctr; ?>
</td>
<td id="t01" style="font-size: 12px;font-size: 12px;vertical-align: top;">
<?php echo $data->itemName; ?>
</td>
<td id="t01" style="text-align: center;font-size: 12px;font-size: 12px;vertical-align: top;">
<?php echo $data->hsnName; ?>
</td>
<td id="t01" style="text-align: center;font-size: 12px;font-size: 12px;vertical-align: top;">
<?php echo number_format($data->qty_received,$itemDec[0]->noofdecimal);?>
</td>
<td id="t01" style="text-align: center;font-size: 12px;font-size: 12px;vertical-align: top;">
<?php echo $data->unitName; ?>
</td>
<td id="t01" style="text-align: center;font-size: 12px;font-size: 12px;vertical-align: top;">
<?php echo number_format($data->rate,2); ?><br>
<?php if($datas[0]->price_term==1){$pt="(FOR)";}else if($datas[0]->price_term==2){$pt="(EX)";}else{$pt='';} echo $pt; ?>
</td>
<td id="t01" style="text-align: center;font-size: 12px;font-size: 12px;vertical-align: top;">
<?php echo number_format($data->taxable_value,2); ?>
</td>
</tr>
<?php } ?>
</tbody>
<tfoot>
<tr>
<td></td>
<td style="text-align: right;font-size: 12px;">Total</td>
<td></td>
<td style="font-size: 12px;text-align: center;">
<?php echo number_format($datastotal[0]->totalQty,$itemDec[0]->noofdecimal) ; ?>
</td>
<td></td>
<td style="text-align: center;font-size: 12px;">Total</td>
<td style="font-size: 12px;text-align: center;">
<?php echo number_format($datastotal[0]->totalAmount,2); ?>
</td>
</tr>
</tfoot>
</table>