Open In App

HTML | tbody charoff Attribute

The HTML tbody 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 tbody Element.

Note: This attribute is not supported by HTML5.



Syntax:

<tbody charoff="number">

Attribute Values:



Example:




<!DOCTYPE html>
<html>
  
<head>
    <title>html tbody charoff 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 charoff 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 charoff Attribute are listed below:


Article Tags :