td

< html‎ | elements
Jump to: navigation, search

td

This article is Almost Ready.


W3C Recommendation

Summary

Defines a standard Cell in an HTML table.


Overview Table

DOM Interface HTMLTableDataCellElement

Attributes

  • colspan = valid non-negative integer
    This attribute gives the number of columns respectively that the cell is to span.
  • rowspan = valid non-negative integer
    This attribute gives the number of rows respectively that the cell is to span.
  • headers = unordered set of unique space-separated tokens
    The value of this attribute must have the value of an id attribute of the th element that is targeted.

Examples

This example uses the table element with tr and td to create a table with three rows and two columns.

HTML

<table border="1" width="80%">
  <tbody>
    <tr>
      <td>Row 1, Column 1 text.</td>
      <td>Row 1, Column 2 text.</td>
    </tr>
    <tr>
      <td>Row 2, Column 1 text.</td>
      <td>Row 2, Column 2 text.</td>
    </tr>
  </tbody>
</table>



Related specifications

Specification Status Related Changes
HTML 5.1 W3C Working Draft
HTML 5 W3C Recommendation
HTML 4.01 W3C Recommendation

See also

Related articles

HTML


















































… further results

Tables










  • td