Version-//W3C//DTD HTML 4.01//EN
ElementTD
Purposetable data cell
DescriptionThis element encloses data in a table's cell. The data is contained in a table row (TR) which is contained in a TABLE.
Start tagRequired <TD>
Attributes
NameTypeDefaultComment
abbr CDATA #IMPLIEDtext; abbreviation for header cell
align( left | center | right | justify | char )#IMPLIEDhorizontal alignment of cell contents
axis CDATA #IMPLIEDcomma-separated list of related headers
char CDATA #IMPLIEDa single character from ISO10646 (see RFC1815); alignment char, e.g. char=':'
charoff CDATA #IMPLIEDnn for pixels or nn% for percentage length; offset for alignment char; horizontal alignment in cells
class CDATA #IMPLIEDspace-separated list of classes
colspan NUMBER 1number of cols spanned by cell
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
headersIDREFS#IMPLIEDlist of id's for header cells
idID#IMPLIEDdocument-wide unique id
lang NAME #IMPLIEDlanguage code as RFC1766; language code
onclick CDATA #IMPLIEDscript expression; a pointer button was clicked
ondblclick CDATA #IMPLIEDscript expression; a pointer button was double clicked
onkeydown CDATA #IMPLIEDscript expression; a key was pressed down
onkeypress CDATA #IMPLIEDscript expression; a key was pressed and released
onkeyup CDATA #IMPLIEDscript expression; a key was released
onmousedown CDATA #IMPLIEDscript expression; a pointer button was pressed down
onmousemove CDATA #IMPLIEDscript expression; a pointer was moved within
onmouseout CDATA #IMPLIEDscript expression; a pointer was moved away
onmouseover CDATA #IMPLIEDscript expression; a pointer was moved onto
onmouseup CDATA #IMPLIEDscript expression; a pointer button was released
rowspan NUMBER 1number of rows spanned by cell
scope( row | col | rowgroup | colgroup )#IMPLIEDscope covered by header cells
style CDATA #IMPLIEDstyle sheet data; associated style info
title CDATA #IMPLIEDtext; advisory title
valign( top | middle | bottom | baseline )#IMPLIEDvertical alignment in cells
Content( P | H1 | H2 | H3 | H4 | H5 | H6 | UL | OL | PRE | DL | DIV | NOSCRIPT | BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS | #PCDATA | TT | I | B | BIG | SMALL | EM | STRONG | DFN | CODE | SAMP | KBD | VAR | CITE | ABBR | ACRONYM | A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO | INPUT | SELECT | TEXTAREA | LABEL | BUTTON )*
End tagOptional </TD>
Referenced in TR
Example
SourceAppearance
<TABLE Border="3" Cellpadding="6" Cellspacing="1">
<CAPTION>The XHTML Playoffs</CAPTION>
<TR> <TH>Game</TH> <TH>Entities</TH> <TH>Elements</TH> </TR>
<TR> <TD>1</TD> <TD>3</TD> <TD>2</TD> </TR>
<TR> <TD>2</TD> <TD>4</TD> <TD>1</TD> </TR>
<TR> <TD>3</TD> <TD>0</TD> <TD>8</TD> </TR>
<TR> <TD>4</TD> <TD>8</TD> <TD>7</TD> </TR>
<TR> <TD>5</TD> <TD>2</TD> <TD>1</TD> </TR>
</TABLE>
<P>
<TABLE border="1">
<CAPTION>Weekly Schedule</CAPTION>
<TR><TH rowspan="2">Tasks</TH>
<TH colspan="7">Days of the Week</TH></TR>
<TR> <TH>Mon</TH> <TH>Tue</TH> <TH>Wed</TH> <TH>Thu</TH> <TH>Fri</TH> <TH>Sat</TH> <TH>Sun</TH> </TR>
<TR> <TH>School</TH> <TD>&nbsp;</TD> <TD>CS111</TD> <TD>&nbsp;</TD> <TD>CS111</TD> <TD>&nbsp;</TD> <TD colspan="2" rowspan="2">Off</TD> </TR>
<TR> <TH>Work</TH> <TD colspan="2">december.com</TD> <TD colspan="3">Weekend Prep</TD> </TR>
</TABLE>
The XHTML Playoffs
Game Entities Elements
1 3 2
2 4 1
3 0 8
4 8 7
5 2 1

Weekly Schedule
Tasks Days of the Week
Mon Tue Wed Thu Fri Sat Sun
School   CS111   CS111   Off
Work december.com Weekend Prep
search Search · star Market
2023-06-19 · John December · Terms © johndecember.com