<td>...</td>

HTML4 HTML5

The <td> tag defines content of a single table cell[cite: 3].

Opening tag is mandatory, closing tag is optional[cite: 3].

Attributes:

abbr="..." - abbreviated cell description[cite: 3]. Not present in HTML5[cite: 3].

align="..." - (left, right, center, justify, char) text alignment[cite: 3]. Not present in HTML5[cite: 3].

axis="..." - cell category name[cite: 3]. Not present in HTML5[cite: 3].

bgcolor="..." - cell background color[cite: 3]. Not present in HTML5[cite: 3].

char="..." - alignment character[cite: 3]. Not present in HTML5[cite: 3].

charoff="..." - alignment offset count[cite: 3]. Not present in HTML5[cite: 3].

colspan="..." - number of columns to span[cite: 3].

headers="..." - specifies header cell associations[cite: 3].

height="..." - cell height[cite: 3]. Not present in HTML5[cite: 3].

nowrap="..." - prevents line breaks inside cell[cite: 3]. Not present in HTML5[cite: 3].

rowspan="..." - number of rows to span[cite: 3].

scope="..." - header/data association scope[cite: 3]. Not present in HTML5[cite: 3].

valign="..." - vertical alignment[cite: 3]. Not present in HTML5[cite: 3].

width="..." - cell width[cite: 3]. Not present in HTML5[cite: 3].

Example

Code:

<table>

  <tr>
    <td>First single cell</td>
    <td>Second single cell</td>
  </tr>
  <tr>
    <td>1</td>
    <td>2</td>
  </tr>
</table>

The browser will interpret this code as follows:

First single cell Second single cell
1 2