Tables in HTML are a great way for displaying data that can be looked up using the row and columns.

Historically, tables have been used historically for maintaining the layout of HTML pages. Using tables for layout is now conidered bad practice, and causes issues with the accessibility of websites.

Tables should only ever be used where we want to display data that can be looked up by row and column, as in the example below

The key elements used to construct a table are as follows:

Example Table


This will render in a similar way to that shown below, though by default the browser may add some grid lines:


You may wish to write <td> elements on a new line to make reading your code easier, this is fine, as the web browser will ignore the extra lines.