2. <col>
• Definition: defines attribute values for one or
more columns in a table
– Must be used inside a <table> or a <colgroup>
element
3. <col>
• <col> sets properties for a column of table
cells, such as this table
– Column = vertical region
4. Placement
• <col> tag goes
– after the <table> tag
– before any <tr> (table row), <thead> (table
head), or <tbody> (table body) elements
• May go inside <colgroup> element, but doesn’t have
to
5. Example usage and result
<table border="1">
<colgroup>
<col span="2" style="background-color:red" />
<col style="background-color:yellow" />
</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>
<tr>
<td>5869207</td>
<td>My first CSS</td>
<td>$49</td>
</tr>
</table>