Skip to content
Related Articles

Related Articles

Improve Article

HTML | <colgroup> align Attribute

  • Last Updated : 07 Aug, 2019

The HTML <colgroup> align attribute is used to set the horizontal alignment of the text or content in the group of column.


<colgroup align="left|right|center|justify|char>

Attribute Values:

  • left: It sets the content to the left-align.
  • right: It sets the content to the right-align.
  • center: It sets the content to the center.
  • justify: It stretches the lines and divided the content equally.
  • char: It sets the content to a specific charaxter.


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


Supported Browsers: The <colgroup> align attribute is not supported by any browsers. Now use CSS instead.

Attention reader! Don’t stop learning now. Get hold of all the important Comcompetitivepetitve Programming concepts with the Web Design for Beginners | HTML  course.

My Personal Notes arrow_drop_up
Recommended Articles
Page :