HTML tables offer a detailed way to present tabular data, as well as a creative way to lay out the information in your web documents. The standard HTML model for tables is straightforward: a table is a collection of data arranged and related in rows and columns of cells. Most cells contain data values; others contain row and column headers that describe the data.
The HTML 4.0 table specification defines a number of tags and attributes for creating tables. Newly supported tags allow you to organize and display table data with great detail, and with the application of CSS style elements, table styles can be standardized across your documents.
The main tags that describe tables are:
<table> tag surrounds the table and gives default specifications
for the entire table such as background color, border size, and
spacing between cells. The optional
<caption> tag is placed within
<table> tags and provides a caption for the table.
denote each row of the table and contain the tags for each
cell within a row.
<td> describe the table cells
<th> being a header cell and
<td> being a regular
<td> tags surround the information that is
displayed within each table cell.
Table cells are defined across each row
of a table. The number of cells in a row is determined by the
<td> tags contained within a
<tr>. If a table
cell spans more than one row (using the
rowspan attribute), ...