HTML <td> Tag
The <td>
tag defines a standard data cell in an HTML table.
An HTML table has two kinds of cells:
- Header cells - contains header information (created with the <th> element)
- Data cells - contains data (created with the
<td>
element)
The text in <td>
elements are regular and left-aligned by default.
The text in <th> elements are bold and centered by default.
Attributes
Attribute | Value | Description |
---|---|---|
colspan | number | Specifies the number of columns a cell should span |
headers | header_id | Specifies one or more header cells a cell is related to |
rowspan | number | Sets the number of rows a cell should span |