Skip to content
Related Articles

Related Articles

How to group the body content in a table using HTML5 ?

View Discussion
Improve Article
Save Article
  • Last Updated : 20 Jan, 2022
View Discussion
Improve Article
Save Article

In this article, group the body content in a <table> element in a document. It is used to define a standard cell in an HTML table.

Syntax:  

<tbody> ... </tbody>

Example: 

html




<!DOCTYPE html>
<html>
 
<head>
    <title>
        How to group the body content
        in a table using HTML5?
    </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>
            HTML5: How to group the body
            content in a table?
        </h2>
         
        <table>
            <thead>
                <tr>
                    <th>Name</th>
                    <th>User Id</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td>Honeysingh</td>
                    <td>@Yo Yo Honey singh</td>
                </tr>
                <tr>
                    <td>GeeksforGeeks</td>
                    <td>@geeks</td>
                </tr>
            </tbody>
        </table>
    </center>
</body>
 
</html>

Output: 

Supported Browsers are listed below: 

  • Google Chrome
  • Internet Explorer
  • Firefox
  • Opera<
  • Safari

My Personal Notes arrow_drop_up
Recommended Articles
Page :

Start Your Coding Journey Now!