Skip to content
Related Articles
Open in App
Not now

Related Articles

HTML | <col> charoff Attribute

Improve Article
Save Article
  • Last Updated : 31 Oct, 2019
Improve Article
Save Article

The HTML <col> charoff attribute is used to set 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 <col> element.

Syntax:

<col charoff="number">

Attribute Values: It contains single value number which holds the numeric value specifies the alignment.

  • Positive values: It indicates the alignment to the right of the characters.
  • Negative values: It indicates the alignment to the left of the characters.

Note: This attribute is not supported by HTML 5.

Example:




<!DOCTYPE html> 
<html
  
<head
    <title
        HTML col charoff Attribute 
    </title
</head
  
<body
    <h1>GeeksforGeeks</h1
  
    <h2>HTML col charoff Attribute</h2
  
    <table border="1"
        <caption>Author Details</caption
  
        <col width="150" align="char" char="."
                    valign="top" charoff ="3"
        <col width="80" align="char" char="." 
                    valign="top" charoff ="3"
        <col width="120" align="char" char="."
                    valign="top"
          
        <tr
            <th>NAME</th
            <th>AGE</th
            <th>BRANCH</th
        </tr
        <tr
            <td>BITTU</td
            <td>22</td
            <td>CSE</td
        </tr
        <tr
            <td>RAM</td
            <td>21</td
            <td>ECE</td
        </tr
    </table
</body
  
</html>

Output:

Supported Browsers: This attribute is not supported by any browsers.


My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!