Tables

Tables display data in rows and columns. They're built from a small set of elements that work together.

Basic table structure

  • <table> — wraps the whole table.
  • <tr> — defines one table row.
  • <th> — a header cell, usually bold and used for column titles.
  • <td> — a standard data cell.

Try adding another row below Priya's:

Try it yourself
Result

Each <tr> is one row; the number of <td>/<th> cells inside it determines how many columns that row has.

Note: every row in a table should have the same number of cells, so columns line up correctly.