This document describes tags used in tables.
Click here to skip over the explanatory material at the top of the page and jump straight to the tags.This table:
and these icons:
Support: 2.0, 3.0, 3.2
1.1+
1.0+
alert you to tags and attributes that are not supported by all browsers. The support page explains the table and the icons in detail.
Not all HTML tags are in this single file. The comprehensive list has been split into the following eight categories:
We have also provided several indexes to help you navigate through this reference. In addition to our main indexes (the compact index and the complete index), there are four other indexes that list the tags according to the standards and browsers that support them.
CDI's Comprehensive HTML Cross Reference was created as a service to the Internet community, and forms part of CDI's Internet and HTML curriculum. It represents a joint effort of CDI Corporate Education Services and Gregory Consulting and is Copyright © 1995 - 2001, CDI Corporate Education Services Limited. Please report any errors or omissions to Kate Gregory.
| Support: |
<CAPTION>text</CAPTION>
![]()
![]()
<CAPTION ALIGN=alignment>text</CAPTION>alignment
<CAPTION ALIGN=
>text</CAPTION>vertical-alignment
<CAPTION VALIGN=
>text</CAPTION>
The caption tag defines the caption of a figure or table. It is valid only within FIG or TABLE tags.
The ALIGN attribute arranges for the caption to be at the TOP or BOTTOM of the table or figure.
The ALIGN attribute sets the alignment of the caption within the table or figure border. It can be LEFT, RIGHT, or CENTER.
The VALIGN attribute arranges for the caption to be at the TOP or BOTTOM of the table or figure.
| Support: |
<MULTICOLattributes>
This tag is a container, used to split the display into columns without using frames or tables. The attributes of this tag are:
COLS="number"TheCOLSattribute is mandatory and controls how many columns the display will be split into.GUTTER="pixels"- The
GUTTERattribute controls the pixels of space between columns. It defaults to a value of 10.WIDTH="number"- The
WIDTHattribute controls the width of an individual column.
| Support: |
<TABLEattributes>table-content</TABLE>
A table consists of an optional caption (CAPTION) and one or more rows (TR.) The attributes are:
ALIGN="alignment" Note that this does not affect the alignment of the table entries.
WIDTH=number BORDER BORDER=number CELLPADDING=number CELLSPACING=number BGCOLOR="#rrggbb"BGCOLOR="colorname"BORDERCOLOR="#rrggbb"BORDERCOLOR="colorname"BORDERCOLORLIGHT="#rrggbb"BORDERCOLORLIGHT="colorname"BORDERCOLORDARK="#rrggbb"BORDERCOLORDARK="colorname"VALIGN="valign"TOP or BOTTOM.CLEAR=clearNOFLOW COLSPEC=colspec UNITS=units COLSPEC or WIDTH attributes are being used and specifies the units to be used for the column or table widths. units should be one of
DP="character" NOWRAP In the attributes above that refer to it, rrggbb is a six digit hexadecimal number with the first two digits specifying the red value, the middle two the green value, and the last two the blue value. Some sample colour values:
Microsoft Explorer supports the use of colour names in the BGCOLOR, BORDERCOLOR, BORDERCOLORLIGHT, and BORDERCOLORDARK attributes. Valid colours are: Aqua, Black, Blue,
Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal,Yellow, and White.
| Support: |
<TBODY>table body</TBODY>
The TBODY tag is used to group together a number of rows within a table, for assigning ID or STYLE values.
CLASS=typeID=valueSTYLE=css1 properties
| Support: |
<COL>content </COL>
<COL ALIGN=alignment>content</COL>number
<COL SPAN=>content</COL>
The <COL> tag sets the properties of one table column at a time. Do not use this tag with a COLGROUP element.
The ALIGN attribute specifies the text alignment in the cells within the colums. The values for "alignment" are LEFT, MIDDLE and RIGHT and the default is MIDDLE.
| Support: |
<COLGROUP>column data</COLGROUP>="align"> column data
<COLGROUP ALIGN</COLGROUP>"valign"
<COLGROUP VALIGN=>column data</COLGROUP>"halign"> column data
<COLGROUP HALIGN=</COLGROUP>"width"> column data
<COLGROUP WIDTH=</COLGROUP>"number"> column data
<COLGROUP SPAN=</COLGROUP>
The COLGROUP tag sets the properties of one or more table columns.
The HALIGN attribute specifies the horizontal alignment of text in the cells for the column group.. The values are LEFT, RIGHT and CENTER (the default.) The VALIGN attribute sets
the vertical alignment for the column. The values are TOP, MIDDLE (the default,) and BOTTOM. The SPAN attribute sets the number of consecutive columns for the group. The WIDTH
attribute specifies the width of each column in the column group.
| Support: |
<TDattributes>
Valid only in a TR, the table data tag defines a table cell. The attributes are:
COLSPAN="number"ROWSPAN="number"NOWRAP ALIGN="align"LEFT, RIGHT or CENTER.VALIGN="align"TOP, MIDDLE, BOTTOM, or BASELINE.BGCOLOR="#rrggbb"BGCOLOR="colorname"BORDERCOLOR="#rrggbb"BORDERCOLOR="colorname"BORDERCOLORLIGHT="#rrggbb"BORDERCOLORLIGHT="colorname"BORDERCOLORDARK="#rrggbb"BORDERCOLORDARK="colorname"In the attributes above that refer to it, rrggbb is a six digit hexadecimal number with the first two digits specifying the red value, the middle two the green value, and the last two the blue value. Some sample colour values:
Microsoft Explorer supports the use of colour names in the BGCOLOR, BORDERCOLOR, BORDERCOLORLIGHT, and BORDERCOLORDARK attributes. Valid colours are: Aqua, Black, Blue,
Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal,Yellow, and White.
| Support: |
<TFOOT>
Defines the table footer. The footer tag is used to group all footers.
CLASS=typeID=valueSTYLE=css1 properties| Support: |
<THEAD>
The THEAD tag defines the table heading. The THEAD tag is used to group all headers together.
ALIGN=left, center, right, justify- Specifies the alignment of text in the heading, the default is center.
CLASS=type- This attribute indicates the class that the element belongs too.
ID=value- This attribute specifies a unique value for the element over the document.
STYLE=css1 properties- This attribute specifies style the information
VALIGN=middle/top/bottom- This attribute specifies the verticle alignment of text in the heading. The default is middle.
| Support: |
<THattributes>
Valid only in a TR, the table header tag defines a header cell. The attributes are:
COLSPAN="number"ROWSPAN="number"NOWRAP ALIGN="align"LEFT, RIGHT or CENTER. Table Header cells default to centred.VALIGN="align"TOP, MIDDLE, BOTTOM, or BASELINE.BGCOLOR="#rrggbb"BGCOLOR="colorname"BORDERCOLOR="#rrggbb"BORDERCOLOR="colorname"BORDERCOLORLIGHT="#rrggbb"BORDERCOLORLIGHT="colorname"BORDERCOLORDARK="#rrggbb"BORDERCOLORDARK="colorname"In the attributes above that refer to it, rrggbb is a six digit hexadecimal number with the first two digits specifying the red value, the middle two the green value, and the last two the blue value. Some sample colour values:
Microsoft Explorer supports the use of colour names in the BGCOLOR, BORDERCOLOR, BORDERCOLORLIGHT, and BORDERCOLORDARK attributes. Valid colours are: Aqua, Black, Blue,
Fuchsia, Gray, Green, Lime, Maroon, Navy, Olive, Purple, Red, Silver, Teal,Yellow, and White.
| Support: |
<TRattributes>
Valid only in a TABLE, the table row tag defines a row of cells that are defined with TH and TD tags. The attributes are:
ALIGN="align"LEFT, RIGHT or CENTER.VALIGN="align"TOP, MIDDLE, BOTTOM, or BASELINE.BGCOLOR="#rrggbb"BGCOLOR="colorname"BORDERCOLOR="#rrggbb"BORDERCOLOR="colorname"BORDERCOLORLIGHT="#rrggbb"BORDERCOLORLIGHT="colorname"BORDERCOLORDARK="#rrggbb"BORDERCOLORDARK="colorname"CLASS="class"Valid only in a TABLE, the table row tag defines a row of cells that are defined with TH and TD tags. The class attribute can be set to one of Header, Body, or Footer to arrange for
header or footer rows to be displayed as the user scrolls through the document.
The ALIGN attribute governs the alignment of the cells within the table rows. "align" can be LEFT or RIGHT. If ALIGN is specified for any cell in the row, the cell alignment
overrides the row alignment.