<TD></TD>

Defines a table data cell


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


Element used to define table data cells.

   <html>
        <head>
        <title>Page with a table</title>
        </head>
        <body>
          .
          .
        <table border=3 cellspacing=2 cellpadding=2 width="80%">
        <caption>Sample Table</caption>
        <tr><th>Column One<th>Column Two<th>Column Three
==>>     <tr><td>Cell One<td>Cell Two<td>Cell Three
==>>     <tr><td>Cell 1 on row 2<td>Cell 2 on row 2<td>Cell 3 on row 2
        </table>
          .
          .
        </body>
        </html>

HTML 3.2 Final

Table data tags can have the following attributes:

nowrap
You can use this attribute if you don't want any line breaks in your text.
rowspan
Put this attribute in if you want the cell to to go down more than one row. If you don't put anything in the browser just assumes 1 row.
colspan
Put this attribute in if you want the cell to go across more than one column. Of course it defaults to one if you put nothing.
align
You can tell the browser to align your cell contents on the left, in the center or on the right. This would override any align attribute you might have put in the tr element. If you don't put in anything the browser defaults to left.
valign
Use this attribute to set the vertical alignment of your cell contents. You can use top, middle or bottom. This attribute overrides the value you may have put on the tr element.
width
Put this in to "suggest" a width for the cell, in pixels. It doesn't count the cellpadding number. The browser uses this number unless it's too small for any of the other cells in the column.
height
Put this in to "suggest a height for the cell, in pixels. It doesn't count the cellpadding number. The browser uses this number unless it's too small for any of the other cells in the row.

You can nest tables, also, so you can end up with some fairly complex designs.

Netscape

Nothing more to add.

Microsoft Internet Explorer

Nothing to add.

Internationalization

Nothing special.


[HOME] [PAGE UP] [PREV PAGE] [NEXT PAGE]


The Rusk Family . . . "the Legend Continues"

Michael T. Rusk
Comments to author: mrusk@radix.net

All contents copyright © 1996, 1997 Michael T. Rusk
All rights reserved.

Revised: December 03, 1997 10:31 -0500
URL: ./htmlgd/tagtd.html