Learning Resources
 

Table Structure


Even a simple table involves several levels of nested elements. A table’s basic structure is:

The table element defines the table itself.
Within the table are one or more tr elements that define table rows.
Within the tr elements are one or more th or td elements. These elements define table header cells and table data cells, respectively.

Adding Rows and Columns
A tr element represents a row. To add another row, just add another tr element with the same number of tds (columns) as the rest of the table:
A td represents a table data cell. To add another column, add another td element to each tr in the table.
Usually table rows containing td (table data) elements. However, rows can also contain th (table header) elements. Table headers label a row or column. By default, most browsers render table headers as bold.
 

The

tag begins the table, you place what you want inside, and end the table with the
tag. To begin adding contents to your table, you will need the and tags. The stands for table row and the stands for table data, which is what you will place after this tag. You end a table data section with the tag and each table row with the tag. Here is a basic table with just one cell:






This is my table!