Roots
Back

Table Rows

Addings rows to a table

<table>
<tr>
<td> Row one </td>
</tr>
<tr>
<td> Row two </td>
</tr>
<tr>
<td> Row three </td>
</tr>
</table>


Additional rows are added by including additional <tr> tags inside the <table>.

Additional attributes

<table>
<tr align="alignment" bgcolor="name / code" valign="baseline / bottom / middle / top" bordercolordark="darkcolor" bordercolorlight="lightcolor">
<td> Row one </td>
</tr>
</table>


alignment - Alignment of the text inside the cells in the row - can be left, center, right or justify.
name - The name of a color for the background of the row, chosen from a list of many recognised color names.
code - The hex code for a color for the background.
baseline - Alignment of the text, as above, but vertically instead of horizontally. Baseline sets the text at the bottom of the line it would normally appear on.
bottom - Vertical alignment, as above. This sets the text at the bottom of the cells in the row.
middle - Vertical alignment, as above. This sets the text in the middle of the cells in the row.
top - Vertical alignment, as above. This sets the text at the top of the cells in the row.
darkcolor - You must specify a width for the table borders for the row borders to show. The darkcolor is the name or hex code for the top and left hand borders of the cells in a row. This is not recognised by all browsers.
lightcolor - The lightcolor is the name or hex code for the bottom and right hand borders of the cells in a row. This is not recognised by all browsers.