Summary
Use the table tag to show tabular content.
Situation
You have some data you want to show in a table.
Action
Use the table tag with nested tags making rows and columns. Sample:
- <table>
- <thead> Header starts
- <tr>
- <th>Course code</th>
- <th>Title</th>
- <th>When offered</th>
- </tr>
- </thead> Header ends
- <tbody> Body starts
- <tr>
- <td>DOG 101</td>
- <td>Introduction to the modern dog</td>
- <td>MW 9:00am - 11:00am</td>
- </tr>
- <tr>
- <td>DOG 110</td>
- <td>Dogs in the ancient world</td>
- <td>M 6:30pm - 9:30pm</td>
- </tr>
- </tbody> Body ends
- <tfoot> Footer starts
- <tr>
- <td colspan="3">Times subject to change.</td>
- </tr>
- </tfoot> Footer ends
- </table>
Where referenced