This particular query appears to be quite simple... I am seeking the HTML code for creating a table:
<table>
<tr>
<th>Heading 1</th>
<td>or</td>
<th>Heading 2</th>
</tr>
<tr>
<td>Data 1 of Row 2</td>
<td>Data 2 of Row 2</td>
</tr>
<tr>
<td>Data 1 of Row 3</td>
<td>Data 2 of Row 3</td>
</tr>
</table>
To display it as follows:
NOT like this:
In simpler terms, I want to present it as:
<table>
<tr>
<th>Heading 1</th>
<td>or</td>
<th>Heading 2</th>
</tr>
<tr>
<td>Data 1 of Row 2</td>
<td></td>
<td>Data 2 of Row 2</td>
</tr>
<tr>
<td>Data 1 of Row 3</td>
<td></td>
<td>Data 2 of Row 3</td>
</tr>
</table>
Even though there are no empty <td>
elements in my code.. I do not wish to include a <td>
element in a table if it is empty.. Could a specific attribute (with value) address this requirement? Is using the style
attribute necessary? (Hopefully not!) Can this be achieved?