XHTML Tables
Tables are meant to display data in a tabular format. Prior to XHTML, tables were widely used for page layout purposes, but with the advent of style sheets, this is officially discouraged by the W3C.
<caption>…</caption>
Usage | Displays a table caption. | Start/End Tag | Required/Required. | Attributes | core, i18n, events. | Empty | No. | Notes | Optional. |
<col />
Usage | Groups individual columns within column groups in order to share attribute values. | Start/End Tag | Required/Illegal. | Attributes | core, i18n, events.
span="numcols"
The number of columns the group contains.
width="width"
The column width as a percentage, pixel value, or minimum value.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of a cell (top, middle, bottom, baseline). | Empty | Yes. |
<colgroup>…</colgroup>
Usage | Defines a column group. | Start/End Tag | Required/Optional. | Attributes | core, i18n, events.
span="numcols"
The number of columns in a group.
width="width"
The width of the columns.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of a cell (top, middle, bottom, baseline). | Empty | No. |
<table>…</table>
Usage | Creates a table. | Start/End Tag | Required/Required. | Attributes | core, i18n, events.
width="width"
Table width.
cols="numcols"
The number of columns.
border="borderwidth"
The width in pixels of a border around the table.
frame="frame"
Sets the visible sides of a table (void, above, below, hsides, lhs, rhs, vsides, box, border).
rules="rules"
Sets the visible rules within a table (none, groups, rows, cols, all).
cellspacing="cellspacing"
Spacing between cells.
cellpadding="cellpadding"
Spacing in cells.
summary="description"
Provides a text description of the table for accessibility purposes. | Empty | No. |
<tbody>…</tbody>
Usage | Defines the table body. | Start/End Tag | Optional/Optional. | Attributes | core, i18n, events.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of cells (top, middle, bottom, baseline). | Empty | No. |
<td>…</td>
Usage | Defines a cell's contents. | Start/End Tag | Required/Optional. | Attributes | core, i18n, events.
abbr="name"
Abbreviated name.
axis="axisnames"
axis names listing row and column headers pertaining to the cell.
rowspan="numrows"
The number of rows spanned by a cell.
colspan="numcols"
The number of columns spanned by a cell.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of cells (top, middle, bottom, baseline).
headers="headers"
Header information for a cell.
scope="scope"
Indicates whether a cell provides header information for other cells. | Empty | No. |
<tfoot>…</tfoot>
Usage | Defines the table footer. | Start/End Tag | Required/Optional. | Attributes | core, i18n, events.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of cells (top, middle, bottom, baseline). | Empty | No. |
<th>…</th>
Usage | Defines the cell contents of the table header. | Start/End Tag | Required/Optional. | Attributes | core, i18n, events.
axis="name"
Abbreviated name.
axes="axisnames"
axis names listing row and column headers pertaining to the cell.
rowspan="numrows"
The number of rows spanned by a cell.
colspan="numcols"
The number of columns spanned by a cell.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of cells (top, middle, bottom, baseline).
headers="headers"
Header information for a cell.
scope="scope"
Indicates whether a cell provides header information for other cells. | Empty | No. |
<thead>…</thead>
Usage | Defines the table header. | Start/End Tag | Required/Optional. | Attributes | core, i18n, events.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of cells (top, middle, bottom, baseline). | Empty | No. |
<tr>…</tr>
Usage | Defines a row of table cells. | Start/End Tag | Required/Optional. | Attributes | core, i18n, events.
align="alignment"
Horizontally aligns the contents of cells (left, center, right, justify, char).
char="charalignment"
Sets a character on which the column aligns.
charoff="charoffset"
Offset to the first alignment character on a line.
valign="verticalalignment"
Vertically aligns the contents of cells (top, middle, bottom, baseline). | Empty | No. |
|