Can I Add Multiple <tbody> Elements in Same Table in HTML ? Last Updated : 22 May, 2023 Comments Improve Suggest changes Like Article Like Report Yes, we can add multiple <tbody> tags in a same table in HTML. The <tbody> tag defines the body content (a set of rows) of an HTML table creating a separate semantic block in it. The <tbody> tag is used along with the <thead> and the <tfoot> tags, which specify the header and footer of the table respectively. The <tbody> tag must be used as a child of the <table> element, after the <caption>, <colgroup> (if any), and the <thead> elements. In HTML5, the <tfoot> element comes either before or after the <tbody> element.When printing a document, the <thead> and <tfoot> elements will define the information that can be the same or very similar on each page of a multi-page table, while the content of the <tbody> tag will vary from page to page. In the case of using <tbody>, you can't have <tr> elements (table rows) that are children of the <table> element, but are not included within the <tbody>. If you use non-header and non-footer rows they must be inside of the <tbody> element. More than one <tbody> element can be used for each table as long as they are all successive. This will separate the rows in large tables into sections and you will be able to format each of them separately. A <table> can have multiple <tbody> elements Below is an example to demonstrate the same HTML <!DOCTYPE html> <html> <head> <title>Title of the document</title> <style> table, table th, table td { border: 1px solid #c817175b; } thead th { width: 150px; border-bottom: solid 1px #15b74068; font-weight: bold; } tbody:nth-child(odd) { background: #0ce04f75; border: solid 1px #0000005f; } tbody:nth-child(even) { background: #10e14f61; border: solid 1px #00000050; } table { margin-left: auto; margin-right: auto; } h1 { text-align: center; } </style> </head> <body> <h1>Demostration for Multiple <tbody> tag</h1> <table> <thead> <tr> <th colspan="3">GeeksForGeeks</th> </tr> <tr> <th>Contest Name</th> <th>Year</th> <th>Article Published</th> </tr> </thead> <tbody align="center"> <tr> <td>Technical Scripter </td> <td>2018</td> <td>934</td> </tr> <tr> <td>Technical Scripter</td> <td>2020</td> <td>2473</td> </tr> <tr> <td>Technical Scripter</td> <td>2022</td> <td>4048</td> </tr> </tbody> <tbody align="center"> <tr> <td>Geeks-Premier-League</td> <td>2022</td> <td>2458</td> </tr> <tr> <td>TrueGeek</td> <td>2021</td> <td>139</td> </tr> </tbody> <tbody align="center"> <tr> <td>ProGeek</td> <td>2019</td> <td>48</td> </tr> <tr> <td>ProGeeks2.0</td> <td>2020</td> <td>78</td> </tr> <tr> <td>ProGeek</td> <td>2021</td> <td>54</td> </tr> </tbody> </table> </body> </html> Comment More infoAdvertise with us Next Article Can I Add Multiple <tbody> Elements in Same Table in HTML ? G guptavivek0503 Follow Improve Article Tags : HTML HTML-Questions Similar Reads How to Create Table in HTML? HTML tables are used for organizing and displaying data in a structured format on web pages. Tables are commonly used for product information, presenting data analytics, or designing a pricing comparison chart. Elements of HTML TableTable ElementsDescription<table>The <table> element def 3 min read How to group the body content in a table using HTML5 ? In this article, group the body content in an <table> element in a document. It is used to define a standard cell in an HTML table. Syntax: <tbody> ... </tbody> Example 1: In this example, we use some HTML tags and make the group the body content in a table. html <!DOCTYPE html 3 min read How create table without using <table> tag ? HyperText Markup Language (HTML) is the standard markup language used to create web pages. HTML allows table creation using the <table> tag. However, tables can also be created in HTML without using <table> tag with the help of Cascading Style Sheet (CSS). CSS is a mechanism for adding s 3 min read What is the rule attribute in HTML Table ? This is an HTML attribute, that is used to specify which parts of the inside borders should be visible. The HTML rule attribute is applicable on table tags. The <table> rules attribute is not supported by HTML 5. Syntax: <table rules="value"> Attributes: This attribute accepts 5 values a 1 min read Why should we avoid use of tables for layout in HTML ? In this article, we will learn why we should avoid using tables for layout in HTML. A website can be divided into various sections comprising of header, menus, content, and footer based on which there are many different layout designs available for developers. Different layouts can be created by usi 4 min read How to fix the height of rows in the table? Fixing the height of rows in a table ensures that all rows have a uniform appearance, preventing them from resizing dynamically based on their content. This approach is useful for maintaining a consistent presentation, especially when dealing with tabular data that needs to be displayed neatly.Here 3 min read How to set the number of rows a table cell should span in HTML ? In this article, we will show how multiple rows are spanned by a table header cell. The task can be done by using the rowspan attribute while using the <th> tag. This property is used to merge one or more cells as well as increase the height of the single header cell automatically. Syntax: 2 min read How to set fixed width for <td> in a table ? The requirement of a table is very normal in the process of designing a web page. HTML provides the <table> tag to construct the table and to define rows and columns <tr> and <td> tags respectively are used. By default, the dimensions of the rows and columns in a table are adjusted 5 min read How to merge table cells in HTML ? The purpose of this article is to explore the method of merging table cells in HTML using the rowspan and colspan attributes. By utilizing rowspan, multiple cells in a row can be merged or combined, while colspan enables the merging of cells in a column within an HTML table. This technique proves es 2 min read How to Create Time-Table Schedule using HTML? A time table or schedule is essential for organizing tasks, events, or classes. Weâll create a basic time-table layout using HTML. A Table is an arrangement of rows and columns. Anyone can create a table by knowing the basics of HTML(HyperText Markup Language). In HTML we can use the <table> t 3 min read Like