HTML <col> tag

HTML <col> tag : Definition

• The HTML <col> tag is used to set the column properties for each column.

• It is generally found within a <colgroup> element.

• The <col> tag is generally used for applying styles to entire columns, instead of repeating the styles for each cell and each row.

<col> tag example :

<!DOCTYPE html>
table, th, td {
  border: 1px solid black;

<h1>The col element example</h1>

    <col span="2" style="background-color:red">
    <col style="background-color:yellow">
    <th>ZIP Code</th>




The col element example

ZIP Code Name Address
815603 Rahul Ranchi
560029 Prayag Bangalore