HTML Dog

Skip to navigation

HTML Tag: td

Table data cell.

td elements are children of tr elements.

Optional Attributes

Attribute Description Possible values
colspan Across how many columns the cell should spread (default is 1). Number.
rowspan Across how many rows the cell should spread (default is 1). Number.
headers Explicitly specifies which header cells, if any, are associated to the data cell. A single or comma-separated list of table cell id values.
Global attributes

Example


<table>
    <tr>
        <th>Question</th>
        <th>Answer</th>
        <th>Correct?</th>
    </tr>
    <tr>
        <td>What is the capital of Burundi?</td>
        <td>Bujumburra</td>
        <td>Yes</td>
    </tr>
    <tr>
        <td>What is the capital of France?</td>
        <td>F</td>
        <td>Erm... sort of</td>
    </tr>
</table>