HTML
table
Used to represent tabular data, the <table>
element can display a 2 dimensional table of data.
Permitted elements are, in order:
<caption>
(0 or 1)<colgroup>
(0 or more)<thead>
(0 or 1)- Either of:
<tbody>
(0 or more)<tr>
(1 or more)
<tfoot>
(0 or 1)
caption
The <caption>
is used to provide a title or caption for a table. It should always be the first child of a <table>
. Styling and physical position can be adjusted using the CSS caption-side
and text-align
properties.
colgroup
The <colgroup>
element allows you to define columns inside of a table. You can then place <col>
elements inside to define those specific column groups. It should appear after <caption>
, but before other child elements of the <table>
.
Last updated: 2019-09-11 09:43:34 -0700