HTML | <colgroup> charoff Attribute

The HTML <colgroup> charoff Attribute is used to sets the number of characters that aligned the characters specified by the char Attribute. This attribute can only be used in the char attribute and align attribute is specified in the colgroup Element.


<colgroup charoff="number">

Attribute Values:

  • number: It contains the numeric value which specify the alignment.
    1. Positive values indicate the alignment to the right of the characters.
    2. Negative values indicate the alignment to the left of the characters.
        • Example:





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




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

          • Google Chrome Not Supported
          • Internet Explorer Not Supported
          • Firefox Not Supported
          • Apple Safari Not Supported
          • Opera Not Supported

          My Personal Notes arrow_drop_up

          Check out this Author's contributed articles.

          If you like GeeksforGeeks and would like to contribute, you can also write an article using or mail your article to See your article appearing on the GeeksforGeeks main page and help other Geeks.

          Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.

          Improved By : shubham_singh

          Article Tags :
          Practice Tags :

          Be the First to upvote.

          Please write to us at to report any issue with the above content.