HTML5 > Structures

Column in HTML5

How to specify column properties in HTML5?

By using <col> tag we can specify the column properties of table, each column with in a colgroup in HTML5. <col> tag is used only when the values of each column are different.

  • tr - To create a Row
  • td - To create a column

            <col />
            <col class="colClass" />            
            <td style="color:yellow;background-color:green;">2</td>
In the above code snippet we can notice that the value of each column is different.

Notice that in the above output each column is indicated by different colour and different value.
 Views: 858 | Post Order: 69

Write for us