CSS Portal

HTML <td> Tag

☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee
<td>
HTML TagThis tag is supported by all modern browsers.
Updated 26th December 2025

Description

The <td> element represents a single cell of data in an HTML table. It is used to contain content such as text, images, links, lists, or other HTML elements within a row of a table. The <td> tag must always be placed inside a <tr> (table row) element and is one of the building blocks of a table, alongside <th> (table header cells) and <tr>.

By default, <td> cells are left-aligned and vertically centered, but their alignment, padding, and styling can be modified with CSS. Each <td> forms a rectangular box within the table grid, and the layout of the table depends on the content and styling of the cells.

A <td> can also be merged across multiple rows or columns using the <rowspan> and <colspan> attributes (though you mentioned you don't need attributes, these are part of its functionality). It is commonly used to display numerical data, textual information, or any other type of content in a structured, tabular form.

Example usage within a table:

<table border="1">
  <tr>
    <td>Apples</td>
    <td>10</td>
    <td>$1.50</td>
  </tr>
  <tr>
    <td>Oranges</td>
    <td>5</td>
    <td>$2.00</td>
  </tr>
</table>

In this example, each <td> defines a data cell containing either a fruit name, a quantity, or a price, structured neatly within rows.

Key points:

  • Must be used inside a <tr> element.
  • Represents a single data cell in a table.
  • Can hold almost any HTML content.
  • Forms the grid layout of a table along with other <td> and <th> cells.
  • Styling and alignment are usually handled with CSS.

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>
Open in editor

Attributes

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 information will show you the current browser support for the HTML <td> tag. Hover over a browser icon to see the version that first introduced support for this HTML tag.

This tag is supported by all modern browsers.

Desktop

Chrome
Edge
Firefox
Opera
Safari

Tablets & Mobile

Chrome Android
Firefox Android
Opera Android
Safari iOS
Samsung Internet
Android WebView
-
Supported Unknown Not supported
☕
Enjoying this site?

Help keep it running with a small coffee donation. Every bit of support is appreciated!

Buy us a coffee