View video tutorial

HTML <col> Tag


The <col> tag specifies the column properties.

HTML <col> Tag

The <col> tag specifies the column properties for each column in a element.

The <col> tag allows styling each column using CSS.

Element Attributes

Attribute Value Description
span number This attribute contains a positive integer which indicates the number of consecutive columns in the col element span. Default value is 1.

Global attributes

Global attributes may be applied on all elements, although some elements may have no effect on them.

<accesskey>, <class>, <contenteditable>, <contextmenu>, <data-*>, <dir>, <draggable>, <dropzone>, <hidden>, <id>, <lang>, <spellcheck>, <style>, <tabindex>, <title>, <translate>.

Learning with HTML Editor "Try it Now"

You can edit the HTML code and view the result using online editor.


        <col span="2" style="background-color:rgb(73, 108, 131)">
        <col style="background-color:#f24576">
        <th>Last Name</th>
        <th>First Name</th>
Try it Now »

Click on the "Try it Now" button to see how it works.