Related Articles

Related Articles

HTML | <col> span Attribute
  • Last Updated : 28 Jun, 2019

The HTML <col> span Attribute is used to specify how many numbers of col element should span.

Syntax:

<col span="number">

Attribute Values: It contains the numeric value which specifies the number of col element should span.

Example:

filter_none

edit
close

play_arrow

link
brightness_4
code

<!DOCTYPE html>
<html>
  
<head>
    <title>
      HTML col span Attribute
  </title>
</head>
  
<body>
    <h1>GeeksforGeeks</h1>
  
    <h2>HTML col span Attribute</h2>
  
    <table border="1">
        <colgroup>
            <col span="2" 
                 style="background-color:green">
                <col style="background-color:blue">
        </colgroup>
        <tr>
            <th>Name</th>
            <th>Branch</th>
            <th>Expenses</th>
        </tr>
  
        <tr>
            <td>BITTU</td>
            <td>CSE</td>
            <td>2500.00</td>
        </tr>
  
        <tr>
            <td>RAKESH</td>
            <td>ECE</td>
            <td>1400.00</td>
        </tr>
    </table>
</body>
  
</html>

chevron_right


Output:

Supported Browsers: The browser supported by HTML <col> span attribute are listed below:

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Safari
  • Opera

full-stack-img




My Personal Notes arrow_drop_up
Recommended Articles
Page :