HTML <col> element


<col> tag assigns attributes to table columns. It's a void tag, no closing tag </col> is needed.

An simple table example
HTMLPHPJavascript
HTML Form Tag PHP Form Validation JS Form Submit

HTML Code of above table:
<table border=1>
<col style="background-color:#CCCCCC">
<caption><b>An simple table example</b></caption>
<tbody>
<tr><th>HTML</th><th>PHP</th><th>Javascript</th></tr>
<tr><td><a href="form.php">HTML Form Tag</a></td>
<td><a href="../php/formvalidation.php">PHP Form Validation</a></td>
<td><a href="../js/submitform.php">JS Form Submit</a></td>
</tr>
</tbody></table>


Attributes of <col> tag;
AttributeDescription
span number of columns covered
valign vertical alignment, including top, middle and bottom. Deprecated in HTML5.
width width of the column. Deprecated in HTML5.