← All tutorials

GoCareerGo Tutorials

HTML Tutorial

Tags, attributes, HTML5 APIs and semantic markup — the web's foundation.

HTML Tables

table, tr, td and th combine to lay out tabular data in rows and columns.

<table>
  <thead>
    <tr><th>Name</th><th>Score</th></tr>
  </thead>
  <tbody>
    <tr><td>Ada</td><td>95</td></tr>
    <tr><td>Grace</td><td>98</td></tr>
  </tbody>
</table>
  • <th> for header cells, <td> for data cells
  • thead/tbody/tfoot group rows semantically and help with styling & accessibility
  • Tables are for tabular DATA — use CSS Grid/Flexbox for visual page layout instead