HTML <td> Tag

Description

The <td> HTML tag, which stands for "table data," is an essential element used within HTML tables to define individual data cells within rows. It is typically used in conjunction with the <tr> (table row) and <th> (table header) tags to create structured and organized tabular data on web pages. Each 'td' element represents a single cell in a table and contains the actual content or data that is displayed within that cell. Tables are widely used for presenting data in a grid-like format, such as in spreadsheets or lists, making <td> tags fundamental for structuring and formatting information on websites.

Properties

Permitted Parents
A <tr> element
Content
Block, inline and text
Start/End Tags
Start tag: required, End tag: required

Example

<table border="1">
<tr>
<th>Animal</th>
<th>Color</th>
</tr>
<tr>
<td>Mouse</td>
<td>White</td>
</tr>
</table>

Attributes

Attribute Definition
headers Specifies the table headers related to a cell
rowspan Sets the number of rows a cell should span
colspan Specifies the number of columns a cell should span

Global Attributes

The <td> tag also supports the Global Attributes in HTML5

Event Attributes

The <td> tag also supports the Event Attributes in HTML5

Browser Support

The following table will show you the current browser support for the HTML <td> tag.

Desktop
Edge Chrome Firefox Opera Safari
121112.11
Tablets / Mobile
Chrome Firefox Opera Safari Samsung Webview
18414114.4

Last updated by CSSPortal on: 30th March 2024