This <col>
element specifies the properties
of a column in a <table>
.
<col> |
Yes | Yes | Yes | Yes | Yes |
Some of the attributes in HTML 4.01 are not supported in HTML5.
char
attribute.The <col> tag supports the Global Attributes in HTML.
The <col> tag supports the Event Attributes in HTML.
col { display: table-column; }
A demo showing how to use <col> tag.
<html>
<body>
<table>
<col style="color: maroon">
<col style="color: red">
<tr>
<td>col 1: maroon</td>
<td>col 2: red</td>
<tr>
<td>col 1: maroon</td>
<td>col 2: red</td>
</tr>
</table>
</body><!-- ww w . j ava 2 s . c o m-->
</html>