Winston Winston - 1 month ago 5
HTML Question

Is it wise or acceptable to create a table with a different number of columns (td) for each row (tr)

I was wondering if it is wise or acceptable to create a table with a different number of columns (td) for each row (tr) using html. For example:

<table>

<tr>
<td>title</td>
</tr>

<tr>
<td>text</td>
<td>and more text</td>
</tr>

</table>


Do I have to include the colspan?

Answer

You do not have to include a colspan=, however, the size of the largest <td></td> will determine the width of the column as it is displayed. Different browsers (and releases) will render the table slightly differently (How the non-defined area is displayed).

Comments