HTML4 HTML5
The <colgroup> tag defines a group of table columns for formatting.
Opening tag is required, closing tag is optional. Placed inside <table> after <caption> and before <thead>, <tbody>, <tfoot>, and <tr>.
span="..." - Number of columns in the group.
align="..." - (left, right, center, justify, char) Text alignment. Not in HTML5.
char="..." - Alignment character. Not in HTML5.
charoff="..." - Alignment character offset. Not in HTML5.
valign="..." - (top, middle, bottom, baseline) Vertical alignment. Not in HTML5.
width="..." - Column group width. Not in HTML5.
Code:
The browser will interpret this code as follows:
| Fueled [l] | Price [PLN/l] | Driven [km] |
|---|---|---|
| 42.4 | 5.06 | 815 |
| 40.7 | 5.21 | 786 |