HTML <td> Tag


A typical cell in an HTML table is defined by the HTML <td> element. It will include table data rather than table heads.

This tag is also generally known as the <td> element. There are two types of cells in an HTML table:

  • Header cells (formed using the <th> element) carry header information.
  • Data cells - data cells (made using the <td> element)

By default, the text in <td> elements is regular and left-aligned. By default, the text in <th> elements is bold and centered.

Syntax

Example

Preview

Attributes

Attribute Value Description
colspan number The amount of columns that a cell should span.
headers header-id Specifies one or more header cells to which a cell is linked.
rowspan number The number of rows that a cell should span is specified.

Supported Browsers

Element Chrome Firefox Safari Edge / IE Opera
<td> Yes Yes Yes Yes Yes