Open In App

HTML | <col> char Attribute

Last Updated : 31 Oct, 2019
Improve
Improve
Like Article
Like
Save
Share
Report

The HTML <col> char attribute is used to set the alignment of the content in a column in a character. It can only be used if the align attribute is set to “character”. The default value of char is the decimal-point character of the page language.

Syntax:

<col char="character">

Attribute Values:

  • character: It specifies the alignment of content to a character.

Note: It is not supported by HTML 5. CSS property is used instead of this attribute.

Example:




<!DOCTYPE html> 
<html
  
<head
    <title
        HTML col char Attribute 
    </title
</head
  
<body
    <h1>GeeksforGeeks</h1
  
    <h2>HTML col char Attribute</h2
  
    <table border="1"
        <caption>Author Details</caption
  
        <col width="150" align="char" char="."
        <col width="80" align="char" char="."
        <col width="120" align="char" char="."
          
        <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: It is not supported by any major browsers.



Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads