<td> : Table Data Cell element

Introduction

The <td> element in HTML stands for “Table Data Cell.” It’s used to define a cell within a table to hold data. Each <td> element represents a single cell within a table row (<tr>).

Here’s an example of how you might use the <td> element to create a table data cell:

Output :

In this example:

  • Each <td> element represents a cell in the table.
  • Each <td> element is contained within a <tr> (table row) element.
  • The first row typically contains header cells, denoted by <th> elements.
  • CSS is used to style the table, including setting border styles, cell padding, and alignment.

This results in a simple table with three columns: Name, Age, and Country, and three rows of data. Each data cell (<td>) holds a piece of information within the table.

Leave a Comment