COL Tag in HTML, How COL <Col> Tag

HTML COL (<col>) Tag


HTML <col> tag is used to specify common column properties for each column inside <colgroup> element in a table. If you want to apply style rules to a specific column cell, you have to go with individual style.

The <col> tag is written as <col> (no end tag). You can also use the span attribute to specify the number of columns to span.

In HTML <col> tag does not require a closing tag but in XHTML it require a closing </col> tag.

Browsers Support:

Google Chrome
Internet Explorer


<!DOCTYPE html>
   <title>The Col Tag</title>
     table, td, th {
     border: 2px solid gray;
     border-collapse: collapse;}
    <h2>Example of Col Tag</h2>
    <p><b>Note:</b> In HTML col tag does not require closing tag but in XHTML it requires closing tag</p>
   <table width="450">
     <col span="2" style="background-color:red">
     <col style="background-color:yellow">
        <th>Sr. No.</th>


Best WordPress Hosting


Discount Coupons

Get a .COM for just $6.98

Secure Domain for a Mini Price

Leave a Reply

    Waiting for your comments