<table>
<colgroup>
<col span="2" style="background-color:red">
<col style="background-color:white">
</colgroup>
<tr>
<th>ISBN</th>
<th>Title</th>
<th>Price</th>
</tr>
<tr>
<td>3476896</td>
<td>My first HTML</td>
<td>$53</td>
</tr>
</table>
Definition and Usage
- The tag is used to format a set of one or more columns in a table.
- Instead of repeating styles for each cell, for each row, the tag may be used to add styles to entire columns.
- NOTE:The tag must be a child of an element, appearing after any and elements and before any thead>, tbody>, tfoot>, or tr> elements.
- Tip: To define different properties to a column within a
<colgroup>
, use the <col> tag within the<colgroup>
tag.
0 Comments