×

html · level 1 · unit 6 · lesson 3

  1. meet it
  2. guess first
  3. your turn
  4. fix it
  5. nailed it

Tap a green word if you get lost.

meet it

A lays out facts in rows and columns.

A table is a grid of facts, like a timetable. Start it with <table>. Each goes in <tr>, short for table row, and runs across the page.

Inside each row, every box of the grid is a , written <td>, short for table data. The cells line up into columns by themselves.

Build a table row by row, from the top. Give each row the same number of cells, so each stays neat.

<table>
  <tr>
    <td>Monday</td>
    <td>Football</td>
  </tr>
  <tr>
    <td>Tuesday</td>
    <td>Swimming</td>
  </tr>
</table>

Press show my page to see it here.

A whole row can also sit on one line of code, which keeps small tables short.