col tag

<Col>

Explanation

Col tag mentions the entire columns available in a table.
<table border="Value"> <colgroup span="Value" style="background-color:Place Color Name"> <col width="Value"></col> <col width="Value"></col> </colgroup> <tr> <td>Name</td> <td>Value</td> </tr> </table>
Element Specific attributes supported by this tag are:
AttributeValueDescription
Span Number Defines how much time a <col> should span in the columns.

Example Code:

Result :

Model Price
Nokia 5220 6000
Nokia 6220 7500

  • This tag must be placed inside the <table>.
  • When span attribute is applied, then there is no need to apply style for the entire column and row in a table.
It is available in previous versions of HTML.
It supports both Global Attributes and Event Attributes in HTML5.

Limitations:

It is applicable to all major browsers.

Ask Questions

Ask Question