Skip to content
Related Articles

Related Articles

HTML | <colgroup> align Attribute

View Discussion
Improve Article
Save Article
  • Last Updated : 17 Dec, 2021

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 character.



<!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.

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!