ExampleA simple HTML table, with two rows and four table cells:
Cell A Cell B Cell C Cell D
Definition and Usage
<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
The text in
<td> elements are regular and left-aligned by default.
The text in <th> elements are bold and centered by default.
|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|
<td> tag also supports the Global Attributes in HTML.
<td> tag also supports the Event Attributes in HTML.