The HTML <table>
element allows web authors to display tabular data (such as text, images, links, other tables, etc.) in a two dimensional table with rows and columns of cells.
<table></table>
<thead></thead>
<tbody></tbody>
<tfoot></tfoot>
<tr></tr>
<th></th>
<td></td>
The various table elements and their content attributes together define the table model. The <table>
element is the container element for table models/tabular data. Tables have rows, columns, and cells given by their descendants. The rows and columns form a grid; a table’s cells must completely cover that grid without overlap. The list below describes the various elements in the table model:
<table>
- The container element for table models/tabular data. <table>
represents data with more than one dimension in the form of a table.<caption>
- Table caption or title (Like a figcaption
to a figure
)<col>
- A column (a no-content element)<colgroup>
- A grouping of columns<thead>
- Table header (only one)<tbody>
- Table body / content (multiple are okay)<tfoot>
- Table footer (only one)<tr>
- Table row