<td>: The TD Element
Last updated: 2026-10-13
<td>The TD Element
A standard table data cell holding the content at a row/column intersection.
| Category | Tables |
|---|---|
| Content Model | Flow content |
| Allowed Parents | Any element that accepts flow content |
| Content Tag | Yes — requires closing </td> tag |
| Status | Standard |
📝 Syntax
<td>Cell content</td>
⚙️ Attributes
This element supports the global attributes plus the following:
| Attribute | Value | Description |
|---|---|---|
colspan | Number of columns to span. | |
rowspan | Number of rows to span. | |
headers | IDs of related header cells (complex tables). |
▶ Example
Edit the code below and see the live result in the playground:
🌐 Browser Support
| Browser | |||||
|---|---|---|---|---|---|
| <td> | ✓ v1 | ✓ v12 | ✓ v1 | ✓ v1 | ✓ v1 |
| Supported in all major browsers | |||||
Tip: td vs th: th is a header, td is data — the difference is semantic.
❓ FAQ
QWhat is the difference between td and th?
A
<td> is a data cell; <th> is a header cell (bold-centered by default, carrying scope semantics). Screen readers use th to build row/column associations — column 3, Q2 row. A table of only td cells is just numbers without context to assistive technology.QHow do colspan and rowspan work on td?
A
colspan='3' spans three columns, rowspan='2' spans two rows; both can combine. Remember the same row needs fewer cells after merging — and heavy criss-cross merging makes tables unmaintainable; restructure instead when you can.QCan td contain block elements?
AYes, td is a transparent container allowing paragraphs, lists, even nested tables. But nested tables hurt readability and accessibility — split rows and columns instead; and wrap long text in
<p> rather than leaving it bare.🏷️ Related Tags
💡 Related Cases
More case studies coming soon — check back later.