Table Tags in HTML


Tables - Tables are for display of data in tabular format for page layout purposes. Since the advent of style sheets use of table fields for page layout is to be discouraged.

TagAttributeDescription
CAPTIONcore, eventsDisplays a table caption
 align="..."Controls alignment (left, center, right, justify)
COLcore, eventsGroups columns within column groups in order to share attribute values
 span="..."The number of columns the group contains
 width="..."The column width as a percentage, pixel or minimum value
 align="..."Horizontally aligns the contents of cells (left, center, right, justify, char)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of a cell (top, middle, bottom, baseline)
COLGROUPcore, eventsDefines a column group
 span="..."The number of columns in a group
 width="..."The width of the columns
 align="..."Horizontally aligns the contents of cells (left, center, right, justify, char)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of a cell (top, middle, bottom, baseline)
TABLEcore, eventsCreates a table
 align="..."Controls alignment (left, center, right, justify)
 bgcolor="..."Sets the background color
 width="..."Table width
 cols="..."The number of columns
 border="..."The width in pixels of a border around the table
 frame="..."Sets the visible sides of a table (void, above, below, hsides, lhs, rhs, vsides, box, border)
 rules="..."Sets the visible rules within a table (none, groups, rows, cols, all)
 cellspacing="..."Spacing between cells
 cellpadding="..."Spacing in cells
TBODYcore, eventsDefines a table body
 align="..."Horizontally aligns the contents of cells (left, center, right, justify, char)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of cells (top, middle, bottom, baseline)
TDcore, eventsDefines a cell's contents
 axis="..."Abbreviated name
 axes="..."Names listing row and column headers pertaining to the cell
 nowrapTurns off text wrapping in a cell
 bgcolor="..."Sets the background color
 rowspan="..."The number of rows spanned by a cell
 colspan="..."The number of columns spanned by a cell
 align="..."Horizontally aligns the contents of cells (top, middle, bottom, baseline)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of cells (top, middle, bottom, baseline)
TFOOTcore, eventsDefines the table footer
 align="..."Horizontally aligns the contents of cells (top, middle, bottom, baseline)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of cells (top, middle, bottom, baseline)
THcore, eventsDefines the cell contents of the table header
 axis="..."Abbreviated name
 axes="..."Names listing row and column headers pertaining to the cell
 nowrapTurns off text wrapping in a cell
 bgcolor="..."Sets the background color
 rowspan="..."The number of rows spanned by a cell
 colspan="..."The number of columns spanned by a cell
 align="..."Horizontally aligns the contents of cells (top, middle, bottom, baseline)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of cells (top, middle, bottom, baseline)
THEADcore, eventsDefines the table header
 align="..."Horizontally aligns the contents of cells (top, middle, bottom, baseline)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of cells (top, middle, bottom, baseline)
TRcore, eventsDefines a row of table cells
 align="..."Horizontally aligns the contents of cells (top, middle, bottom, baseline)
 char="..."Sets a character on which the column aligns
 charoff="..."Offset to the first alignment character on a line
 valign="..."Vertically aligns the contents of cells (top, middle, bottom, baseline)
 bgcolor="..."Sets the background color