Skip to content
Related Articles

Related Articles

HTML | <colgroup> span Attribute

View Discussion
Improve Article
Save Article
  • Last Updated : 21 Jul, 2022

The HTML <colgroup> span Attribute is used to define the number of column that a <colgroup> element should span. 


<colgroup span="number">

Attribute Values:

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



<!DOCTYPE html>
        HTML ColumnGroup span Attribute
        #myColGroup {
            background: green;
        table {
            color: white;
            margin-left: 180px;
            background: yellow;
        #Geek_p {
            color: green;
            font-size: 30px;
        td {
            padding: 10px;
<body style="text-align:center;">
    <h1 style="color:green;">
      HTML ColumnGroup span Attribute
        <colgroup id="myColGroup" span="2">



Supported Browsers: The browsers supported by HTML <colgroup> span Attribute are listed below:

  • Google Chrome 1
  • Edge 12
  • Internet Explorer
  • Firefox 1
  • Apple Safari
  • Opera

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!