HTML | <col> span Attribute
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:
html
<!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 > |
Output:
Supported Browsers: The browser supported by HTML <col> span attribute are listed below:
- Google Chrome 1 and above
- Edge 12 and above
- Internet Explorer
- Firefox 1 and above
- Safari
- Opera
Please Login to comment...