<Col> HTML Tag

In this article I will discuss the col tag of HTML.
  • 2029

The HTML <col> tag is used for specifying column properties for each column within a colgroup.The <col> tag defines attribute values for one or more columns in a table. This tag is useful for applying styles to entire columns, instead of repeating the styles for each cell, for each row. This tag can only be used inside a <table> or a <colgroup> element.







    <table border="1">


            <col style="background-color: red" />

            <col style="background-color: yellow" />

            <col style="background-color: Blue" />

            <col style="background-color: Gray" />






























Employee_id Employee_name Employee_salary Employee_address
101 XYZ 10000 Delhi
201 ABC 7000 Noida
205 PQR 8000 Rampur

Ask Your Question 

Got a programming related question? You may want to post your question here
© 2020 DotNetHeaven. All rights reserved.