Published Jul 31, 2021Updated Sep 3, 2021
Contribute to Docs

Defines an HTML table.


<!-- Takes in elements to create a table -->

The following elements are used to create a table:

  • <th>: Defines table header.
  • <tr>: Defines table row.
  • <td>: Defines table data/cell.

Example 1

Creating a simple table with three rows and two columns.

Company Phone
Apple iPhone
Samsung Galaxy

All contributors

Looking to contribute?

Learn HTML on Codecademy