Empty cells

 

If you do not put any data between a <td> tag and a </td> tag, the border will not show for that cell.

 

 

Example Code

 

Result

 

<h4>No data is row 2, cell 2</h4>

 

<table border="1">

<tr>

  <td>100</td>

  <td>200</td>

  <td>300</td>

</tr>

<tr>

  <td>400</td>

  <td></td>

  <td>600</td>

</tr>

</table>

 

 

 

If you want to keep a cell empty but have the border appear, you can use a non-breaking space (&nbsp;) between the <td> and </td> tags.

 

 

Example Code

 

Result

 

<h4>Non‑breaking space in row 2, cell 2</h4>

 

<table border="1">

<tr>

  <td>100</td>

  <td>200</td>

  <td>300</td>

</tr>

<tr>

  <td>400</td>

  <td>&nbsp;</td>

  <td>600</td>

</tr>

</table>