The simplest table consists of the <table> and </table> tags to define the table, the <tr> tag to define the rows and the <td> tags to define the columns. Nothing happens without these three tags. The <tr> tag establishes the rows and contains the cells.
<TABLE>"Paged browsers when splitting a table across a page boundary, can then insert footer rows at the bottom of the current page and header rows at the top of the next page, followed by the remaining body rows and the footer rows. This is repeated as necessary until all of the body rows have been rendered. Refinements of this scheme can be devised by further subclassing the rows together with an appropriate style sheet." (w3)
align=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0? |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
The "align=" attribute controlls the horizontal alignment of data in a cell.
|
| "left"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
quad left
|
| "right"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
quad right
|
| "center"
default
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
quad center
|
| "decimal"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
"Text lines are indented such that the first occurrence of a decimal point on each line are aligned vertically. If a line doesn't contain a decimal point, the line is rendered flush left for data cells and centered for header cells.
Note: By default, header cells are centered while data cells are flush left. This attribute can be used to alter these defaults on a row by row basis. If you are specifying column alignments with the TABLE's COLSPEC attribute, there is no point in also including an ALIGN attribute with the TR element, as the latter will be ignored." (HTML 3.0)
|
| "justify"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
justified
|
| "char" |
aligned over a specific character defined by "char=" (see below)
|
bgcolor=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.1 |
2.0 |
3.0 |
4.0 |
|
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
sets the background colour of the table row, (IExplorer)
|
| #rrggbb |
this is six hexadecimal numbers that stipulates a specific colour from a palette of 32768 colours. The colours are specified in rr="" red, gg="" green, bb="" blue. According to Microsoft, the # sign is optional
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by:Gernot Metze
|
| colorname |
in addition to the #rrggbb combination above, specific colours can be specified by name. Supported colours are:
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by:Gernot Metze
black, maroon, green, olive, navy, purple, teal, gray, silver (silver), red, lime, yellow, blue, fuchsia, aqua and white (white)
|
bordercolor=
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
sets border color and must be used with the BORDER attribute. (IExplorer)
|
| #rrggbb |
this is six hexadecimal numbers that stipulates a specific colour from a palette of 32768 colours. The colours are specified in rr= red, gg= green, bb= blue. According to Microsoft, the # sign is optional
C
o
l
o
u
r
s
with 140 named Netscape colours and 16 named Internet Explorer colours.
This is a complete explanation of colour by:
Gernot Metze
| a small table bordercolor="#3cb371"
|
|
| colorname |
in addition to the #rrggbb combination above, specific colours can be specified by name. Supported colours are:
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by: Gernot Metze
black, maroon, green, olive, navy, purple, teal, gray, silver (silver), red, lime, yellow, blue, fuchsia, aqua and white (white)
| a small table bordercolor="green" |
|
bordercolordark=
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
Sets independent border color control over one of the two colors used to draw a 3D border, opposite of BORDERCOLORLIGHT and must be used with the BORDER attribute. (IExplorer)
|
| #rrggbb |
this is six hexadecimal numbers that stipulates a specific colour from a palette of 32768 colours. The colours are specified in rr="" red, gg="" green, bb="" blue. According to Microsoft, the # sign is optional
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by: Gernot Metze
| a small table bordercolordark="#800000" |
|
| colorname |
in addition to the #rrggbb combination above, specific colours can be specified by name. Supported colours are:
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by: Gernot Metze
black, maroon, green, olive, navy, purple, teal, gray, silver (silver), red, lime, yellow, blue, fuchsia, aqua and white (white)
| a small table bordercolordark="maroon" |
|
bordercolorlight=
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
sets independent border color control over one of the two colors used to draw a 3D border, opposite of BORDERCOLORDARK and must be used with the BORDER attribute. (IExplorer)
|
| #rrggbb |
this is six hexadecimal numbers that stipulates a specific colour from a palette of 32768 colours. The colours are specified in rr="" red, gg="" green, bb="" blue. According to Microsoft, the # sign is optional
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by: Gernot Metze
| a small table bordercolorlight="#0000cd" |
|
| colorname |
in addition to the #rrggbb combination above, specific colours can be specified by name. Supported colours are:
Colours with 140 named Netscape colours and 16 named Internet Explorer colours. This is a complete explanation of colour by: Gernot Metze
black, maroon, green, olive, navy, purple, teal, gray, silver (silver), red, lime, yellow, blue, fuchsia, aqua and white (white)
| a small table bordercolorlight="mediumblue" |
|
cellhalign=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
Provides control of the horizontal alignment of data in the cells. This is an identical condition to "align=", above, so the purpose of this attribute is not certain.
|
| "left" |
This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
|
| "center" |
This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
|
| "right" |
This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
|
cellvalign=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
Controls the vertical alignment of data in the cell. This is an identical condition to "valign=" below, so the purpose of this attribute is unclear, given the lack of arguments in the specification.
|
| "bottom" |
This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
|
| "middle" |
This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
|
| "top" |
This is total supposition on the part of the author! The specification (HTML 4.0) gives no arguments to this attribute.
|
char=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
The "char=" attribute takes a character that specifies the alignment of subsequent text. This is usually used when displaying monetary values. This defaults to the decimal point for the current language. The argument is case sensitive.
|
charoff=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
"CHAROFF is a decimal number that specifies the offset for the alignment character from the beginning of the table cell in the DIR direction. Units may be specified using the standard defined units suffixes plus the special suffix of the percent sign indicating the percentage of offset within the cell from the beginning of the cell." (Sandia)
The HTML 4.0 explanation is equally convoluted and since it is unlikely to be supported by most browsers, 'enuf said.
|
| "## en" |
set offset to ## nutts (en spaces - an en space is approximately 1/2 the space of the capital M)
|
| "### pixels" |
set offset to ### pixels
|
| "##%" |
sets offset to ##% of the cell width
|
class=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
|
dir=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
|
| "ltr" |
|
| "rtl" |
|
dp=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
|
This specifies the character to be used for the decimal point with the COLSPEC attribute, e.g. dp="." (the default) or dp=",." The default may be altered by the language context, as set by the LANG attribute on enclosing elements. (w3)
The MSIE 2.0 and 3.0 DTDs specify that this attribute is not supported.
|
id=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
|
lang=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
|
|
nowrap=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
1.0 |
2.1 |
3.0 |
|
|
 |
0.9 |
1.2 |
|
|
|
|
The NOWRAP attribute is used when you don't want the browser to automatically wrap lines. You can then explicitly specify line breaks in paragraphs using the BR element. (w3)
|
style=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
A text string providing rendering information specific to this element in a notation independent of HTML. (W3)
|
title=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
|
|
transparency=
 |
0.9 |
1.2 |
|
|
|
|
A WebTV attribute:
With version 1.1 of the WebTV interface, use the transparency attribute for the background color for cells in a row. The value for the transparency attribute can range from 0 (fully opaque) to 100 (fully transparent). The default value for transparency is 0. Note that the WebTV interface has implemented optimizations for a transparency value of 50 that make pages draw faster.
|
valign=
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
defines the alignment of the text within the table cell
|
| "baseline"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
|
| "bottom"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
|
| "middle"
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
|
| "top"
default
 |
+ |
2.0 |
3.0 |
3.2 |
4.0 |
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
 |
0.9 |
1.2 |
|
|
|
|
|
width=
 |
1.0 |
2.0 |
3.0 |
4.0 |
|
|
This specifies the width of the table according to the UNITS attribute. If units="relative," the width is taken as a percentage of the width between the current left and right margins. The user agent should disregard this attribute if it would result in columns having less than their minimum widths. (w3)
| a small table - width="40" |
MSIE 2.0 DTD does not specify any arguments. For that reason, they are not presented here.
|