Version-//W3C//DTD XHTML 1.0 Transitional//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 used for titles; abbreviation for header cell
align( left | center | right | justify | char )#IMPLIEDhorizontal alignment of cell contents
axis CDATA #IMPLIEDcomma-separated list of related headers
bgcolor CDATA #IMPLIEDcolor code as #RRGGBB in hexadecimal or 16 named colors; cell background color
char CDATA #IMPLIEDalignment char, e.g. char=':'; a single character as per XML specification which defines a character as an atomic unit of text as specified by ISO/IEC 10646 [ISO/IEC 10646] (see also [ISO/IEC 10646-2000])
charoff CDATA #IMPLIEDoffset for alignment char; nn for pixels or nn% for percentage length; horizontal alignment in cells
class CDATA #IMPLIEDspace-separated list of classes
colspan CDATA "1"one or more digits; number of cols spanned by cell
dir( ltr | rtl )#IMPLIEDdirection for weak/neutral text
headersIDREFS#IMPLIEDlist of id's for header cells
height CDATA #IMPLIEDnn for pixels or nn% for percentage length
idID#IMPLIEDdocument-wide unique id
langNMTOKEN#IMPLIEDlanguage code (backwards compatible); language code as RFC3066
nowrap( nowrap )#IMPLIEDsuppress word wrap
onclick CDATA #IMPLIEDa pointer button was clicked; script expression
ondblclick CDATA #IMPLIEDa pointer button was double clicked; script expression
onkeydown CDATA #IMPLIEDa key was pressed down; script expression
onkeypress CDATA #IMPLIEDa key was pressed and released; script expression
onkeyup CDATA #IMPLIEDa key was released; script expression
onmousedown CDATA #IMPLIEDa pointer button was pressed down; script expression
onmousemove CDATA #IMPLIEDa pointer was moved within; script expression
onmouseout CDATA #IMPLIEDa pointer was moved away; script expression
onmouseover CDATA #IMPLIEDa pointer was moved onto; script expression
onmouseup CDATA #IMPLIEDa pointer button was released; script expression
rowspan CDATA "1"one or more digits; number of rows spanned by cell
scope( row | col | rowgroup | colgroup )#IMPLIEDscope covered by header cells
style CDATA #IMPLIEDassociated style info; style sheet data
title CDATA #IMPLIEDadvisory title; text used for titles
valign( top | middle | bottom | baseline )#IMPLIEDvertical alignment attributes for cell contents; vertical alignment in cells
width CDATA #IMPLIEDnn for pixels or nn% for percentage length; width for cell
xml:langNMTOKEN#IMPLIEDlanguage code (as per XML 1.0 spec); language code as RFC3066
Content( #PCDATA | p | h1 | h2 | h3 | h4 | h5 | h6 | div | ul | ol | dl | menu | dir | pre | hr | blockquote | address | center | noframes | isindex | fieldset | table | form | a | br | span | bdo | object | applet | img | map | iframe | tt | i | b | u | s | strike | big | small | font | basefont | em | strong | dfn | code | q | samp | kbd | var | cite | abbr | acronym | sub | sup | input | select | textarea | label | button | noscript | ins | del | script )*
End tagRequired </td>
Referenced in tr
Example
SourceAppearance
<table border="3" cellpadding="6" cellspacing="1" align="center">
<caption>The XHTML Playoffs</caption>
<tr>
<th>Game</th>
<th>Entities</th>
<th>Elements</th></tr>
<tr>
<td>1</td>
<td bgcolor="#7CCD7C">3</td>
<td>2</td></tr>
<tr>
<td>2</td>
<td bgcolor="#7CCD7C">4</td>
<td>1</td></tr>
<tr>
<td>3</td>
<td>0</td>
<td bgcolor="#7CCD7C">8</td></tr>
<tr>
<td>4</td>
<td bgcolor="#7CCD7C">8</td>
<td>7</td></tr>
<tr>
<td>5</td>
<td bgcolor="#7CCD7C">2</td>
<td>1</td></tr></table>
<table border="1" bgcolor="#FFF8DC">
<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 bgcolor="cyan">
<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 bgcolor="yellow">
<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
Save this page to any social bookmarking site! Share · Search · Market · Directory
2015-11-01 · John December · Contact · Terms of Use © December Communications, Inc.