Roots
Back

Table Columns

Addings columns to a table

<table>
<tr>
<td> Row one, column one </td>
<td> Row one, column two </td>
</tr>
<tr>
<td> Row two, column one </td>
<td> Row two, column two </td>
</tr>
</table>


To add columns to a table, include additional <td> tags in the row you want them to appear in. Each <td> tag essentially creates a new cell in the table.

Additional attributes

<table>
<tr>
<td align="alignment" bgcolor="name / code" bordercolor="name / code" colspan="colvalue" rowspan="rowvalue" height="value / percentage" width="value / percentage" > Row one, column one </td>
</tr>
</table>


alignment - The alignment of the text in the cell. This can be left, center, right or justify.
name - The name of a color for the background or border, chosen from a list of recognised names.
code - The hex code for a color.
colvalue - The number of columns this cell should span across.
rowvalue - The number of rows this cell should span across.
value - The height or width of the cell, given in pixels.
percentage - The height or width of the cell, given as a percentage of the size of table.