Parts of a Table

A table in HTML is defined using a series of different tags. Each table starts and ends with the <table> and </table> tags respectively. Each row is defined with the <tr> (for table row) and </tr> tags. Within each row there are a number of cells, each starting and ending with <td> (for table data) and </td>.

Each of these tags can have a number of attributes set for them. The overall background colour of the table is set in the <table> tag, while you can also set the colour of individual cells in the <td> tags. In the <table> tag you can define the number of columns in the table. You can set the height and width of the cells in the <tr> and <td> tags respectively.