Table

End Tag: Required
Support Key: 2 | 3 | 3.2 | 4 | IE2 | M2A8 | N1.1 | O2.1
What is it?
Attributes
Tag Example
Parent/Content Model
Tips & Tricks
Browser Peculiarities
= Index DOT Html by Brian Wilson [bloo@blooberry.com] =
Main Index | Element Tree | Element Index | HTML Support History


What is it?
This is the top level containing element for HTML table structures. All formatting information lies between the beginning and ending Table tags. By default, tables have no borders. All attributes of the Table element apply globally to each cell in the table unless overridden at a sub-element level (row, cell, etc.) by other attributes.

SOME attributes to the TABLE element are only applicable when the table is constructed using the Complex Table Model which allows a finer level of control than the Simple Table Model while maintaining backward compatibility with the simpler model.

Common Attributes
%Core%
2 | 3 | 3.2 | 4 | IE3 | M | N | O
%Events%
2 | 3 | 3.2 | 4 | IE4B1 | M | N | O
%Language%
2 | 3 | 3.2 | 4 | IE4 | M | N | O
%Data%
2 | 3 | 3.2 | 4 | IE4 | M | N | O

Specific Attributes
Align
2 | 3 | 3.2 | 4 | IE2 | M3 | N2 | O2.1
Required? No
Description:
At the Table level this attribute indicates horizontal alignment of the table itself relative to the browser window.
Values: Left | Center | Right
Background
2 | 3 | 3.2 | 4 | IE3A1 | M | N4B3 | O
Required? No
Description:
This attribute specifies a background image to be used as the backdrop for the table. All cell contents will be displayed over this image. If the referenced image is smaller than the table size, it will be tiled to fit all of the table area.
Values: Either an absolute or relative URL
BGColor
2 | 3 | 3.2 | 4 | IE2 | M | N3B1 | O2.1
Required? No
Description:
Specifies the background color of all the table cells. This value can also be overridden at the cell level.
Values: An RGB triplet or a special Color name
Border
2 | 3 | 3.2 | 4 | IE2 | M2A8 | N1.1 | O2.1
Required? No
Description:
This is an attribute that specifies the size of the border around the table. If the value is 0 or absent, no border is rendered. An additional value of Border can be specified [this is a legacy value that is supported only for backward compatibility with early Table specifications.]
Values: Integers indicating pixel width of the border.
BorderColor
2 | 3 | 3.2 | 4 | IE2 | M | N | O
Required? No
Description:
This attribute sets the external border color to be used for the entire table. Display of this attribute is dependent on the presence of the BORDER attribute in the TABLE element.
Values: An RGB triplet or a special Color name.
BorderColorDark
2 | 3 | 3.2 | 4 | IE2 | M | N | O
Required? No
Description:
This attribute allows independent, 3-D color control over the lower and right hand borders of the external border color for the current table. To change the upper and left hand borders of the external cell border color for the current table, use the BorderColorLight attribute (see below.) Display of this attribute is dependent on the presence of the BORDER attribute in the TABLE element.
Values: An RGB triplet or a special Color name
BorderColorLight
2 | 3 | 3.2 | 4 | IE2 | M | N | O
Required? No
Description:
This attribute allows independent, 3-D color control over the upper and left hand borders of the external border color for the current table. To change the lower and right hand borders of the external cell border color for the current table, use the BorderColorDark attribute (see above.) Display of this attribute is dependent on the presence of the BORDER attribute in the TABLE element.
Values: An RGB triplet or a special Color name
CellPadding
2 | 3 | 3.2 | 4 | IE2 | M3 | N1.1 | O2.1
Required? No
Description:
This specifies globally for all cells in the table the spacing between data in a table cell and the border of the cell.
Values:
Integers indicating pixel width of the padding.
CellSpacing
2 | 3 | 3.2 | 4 | IE2 | M3 | N1.1 | O2.1
Required? No
Description:
This specifies globally for all cells in the table the spacing between individual cells.
Values:
Integers indicating pixel width of the spacing.
Cols
2 | 3 | 3.2 | 4 | IE3A1 | M | N4B2 | O
Required? No
Description:
This Complex Table Model attribute explicitly specifies the number of columns in the table. Using this attribute can allow the browser to dynamically render the table as it is downloaded. If this attribute is absent, it is necessary to receive all of the Table code structure to determine the number of columns and their appropriate widths before display.
Values:
Positive integers representing the number of columns listed in the Table HTML content.
Datapagesize
2 | 3 | 3.2 | 4 | IE4 | M | N | O
Required? No
Description:
Sets the number of records displayed in a data bound repeated table.
Values:
Positive integers.
Frame
2 | 3 | 3.2 | 4 | IE3A1 | M | N | O
Required? No
Description:
This Complex Table Model attribute allows independent control over the outer border display of the table. Using this attribute coupled with the RULES attribute yields much greater border display control than the older Simple Table Model. This attribute takes a single value representing the sides of the outer table border for which to draw borders
Values:
  Void [Do not render any borders]
  Above [Border on top side only]
  Below [Border on bottom side only]
  HSides [Render horizontal borders only (top and bottom sides.)]
  VSides [Render vertical borders only (left and right sides.)]
  LHS [Border on left side only]
  RHS [Border on right side only]
  Box [Border on all four sides]
  Border [Border on all four sides - just like BOX - DEFAULT]
Height
2 | 3 | 3.2 | 4 | IE2 | M | N1.1 | O2.1
Required? No
Description:
Specifies the height of the entire table.
Values:
Specified in pixels or a percentage of the browser window height.
Rules
2 | 3 | 3.2 | 4 | IE3A1 | M | N | O
Required? No
Description:
This Complex Table Model attribute is similar to the FRAME attribute, but where FRAME controls the outer borders around a table, RULES controls the interior dividing line display in a table. Using this attribute coupled with the FRAME attribute yields much greater border display control than the older Simple Table Model.
Values:
  None [No interior borders are displayed]
  Groups [Horizontal borders are displayed between all table groups specified using the THEAD, TBODY, TFOOT and COLGROUP tags.]
  Rows [Horizontal borders are displayed between all table rows (TR)]
  Cols [Vertical borders are displayed between all table columns]
  All [Borders displayed between all table cells]
Summary
2 | 3 | 3.2 | 4 | IE | M | N | O
Required? No
Description:
This attribute aids accessibility for non-visual browsers by providing a summary of the table's purpose and structure.
Values:
Alphanumeric characters.
Width
2 | 3 | 3.2 | 4 | IE2 | M3 | N1.1 | O2.1
Required? No
Description:
Specifies the width of the entire table.
Values:
Specified in pixels or a percentage of the browser window width.
Example
[Using the Complex Table Model]
<table BORDER="2" ALIGN="left" CELLPADDING="5" BORDERCOLOR="#ff0000"
COLS="4" FRAME="vsides" RULES="rows" WIDTH="75%">
<caption ALIGN="top">Juggling Capabilities of Waterfront Performers</caption>
<thead>
      <tr> <th>Juggler</th> <th>Pins</th> <th>Bowling Balls</th> <th>Flaming Baseballs</th> </tr>
</thead>
<tfoot>
      <tr> <th COLSPAN=4>NOTE: This is only a small sample</th> </tr>
</tfoot>
<tbody>
      <tr> <td>Bob</td> <td>5</td> <td>2</td> <td>5</td> </tr>
      <tr> <td>Larry</td> <td>2</td> <td>7!!!</td> <td>NA</td> </tr>
      <tr> <td>Julie the Great</td> <td>1</td> <td>2</td> <td>20<br> (She IS great!)</td> </tr>
</tbody>
</table>
[Same table using the Simple Table Model]
<table BORDER="2" ALIGN="left" CELLPADDING="5" BORDERCOLOR="#ff0000" WIDTH="75%">
      <caption ALIGN="top">Juggling Capabilities of Waterfront Performers</caption>
      <tr> <th>Juggler</th> <th>Pins</th> <th>Bowling Balls</th> <th>Flaming Baseballs</th> </tr>
      <tr> <td>Bob</td> <td>5</td> <td>2</td> <td>5</td> </tr>
      <tr> <td>Larry</td> <td>2</td> <td>7!!!</td> <td>NA</td> </tr>
      <tr> <td>Julie the Great</td> <td>1</td> <td>2</td> <td>20<br>(She IS great!)</td> </tr>
      <tr> <th COLSPAN=4>NOTE: This is only a small sample</th> </tr>
</table>
Parent Model
%Block Parent%
Content Model
<caption> | <col> | <colgroup> | <tr> | <thead> | <tbody> | <tfoot>
Tips & Tricks Browser Peculiarities
Boring Copyright Stuff...