Open In App

HTML | tbody char Attribute

The HTML tbody char Attribute is used to specify the alignment to the character of content in a tbody element. This attribute can only be used if the align attribute is set to “char”. Its default value is a decimal point for page language. It is not supported by HTML 5.

Syntax:



<tbody char="character">

Attribute Values:

Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>html tbody char Attribute </title>
    <style>
        body {
            text-align: center;
        }
          
        h1 {
            color: green;
        }
          
        th {
            color: blue;
        }
          
        table,
        tbody,
        td {
            border: 1px solid black;
            border-collapse: collapse;
        }
    </style>
</head>
  
<body>
    <center>
        <h1>GeeksforGeeks</h1>
        <h2> HTML tbody char Attribute</h2>
        <table>
            <thead>
                <tr>
                    <th>Name</th>
                    <th>User Id</th>
                </tr>
            </thead>
  
            <!-- tbody tag starts from here -->
            <tbody align="char" char="." charoff="2">
                <tr>
                    <td>Shashank</td>
                    <td>@shashankla</td>
                </tr>
                <tr>
                    <td>GeeksforGeeks</td>
                    <td>@geeks</td>
                </tr>
            </tbody>
            <!-- tbody tag ends here -->
  
        </table>
    </center>
</body>
  
</html>

Output:



Supported Browsers: The browsers supported by HTML tbody char Attribute are listed below:


Article Tags :