TABLE Element

The TABLE element is used to define displays of data in rows and columns. Some HTML developers also use nested tables to lay out information on a Web page. This latter use of tables may become less necessary as HTML 4 browsers become available which recognize style sheets.

The TABLE element was first used as an extension of HTML for Netscape Navigator browsers. Formally specified in 1996 in HTML 3.2, the features of tables were extended in the HTML 4.0 draft specifications in 1997. This document summarizes the HTML 4.0 capabilities for tables.

Table Elements

To make a table, you use several related elements, all contained within the TABLE element. Here is a quick list of the related elements that are typically used together to create a table:

Table Examples

Here's a quick example of a very simple table:

<TABLE Border="1">
   <CAPTION>August Standings</CAPTION>
   <TR><TH Rowspan="2"></TH><TH Colspan="2">Totals</TH></TR>
   <TR><TH>Wins</TH><TH>Losses</TH></TR>
   <TR><TH Align="left">White Sox</TH><TD>22</TD><TD>55</TD></TR>
   <TR><TH Align="left">Tigers</TH><TD>84</TD><TD>8</TD></TR>
</TABLE>
        
This table is rendered in your current browser as:

August Standings
Totals
WinsLosses
White Sox2255
Tigers848

This would be rendered, in a Level 3 browser, something like this:

        August Standings
+-------------------------------+
|           |      Totals       |
|           |-------------------|
|           |  Wins   |  Losses |
|-----------+---------+---------|
| White Sox |   22    |    55   |
|-----------+---------+---------|
| Tigers    |   84    |     8   |
+-------------------------------+
A more elaborate example table shows other options available.

Details of Table-related Elements

The TABLE element has these attributes:

Elements Used with TABLE

Contained within a TABLE element, you may put these elements:

References

search Search · star Market
2023-06-19 · John December · Terms © johndecember.com