</> Code Corner

HTML · HTML Tutorial · Lesson 18

HTML Tables

Arrange data into rows and columns.

HTML tables allow web developers to arrange data into rows and columns.

Example

<table border="1">
  <tr>
    <th>Company</th>
    <th>Country</th>
  </tr>
  <tr>
    <td>Alfreds Futterkiste</td>
    <td>Germany</td>
  </tr>
  <tr>
    <td>Centro comercial</td>
    <td>Mexico</td>
  </tr>
</table>
Tag Description
<table> Defines a table
<tr> Defines a table row
<th> Defines a header cell (bold and centered by default)
<td> Defines a data cell
<caption> Defines a table caption

Spanning Columns

Keep reading “HTML Tables”

Sign up to read the full lesson (2 more parts), try every example in the live editor, and take the 5-question quiz.

Chat with us 👋