HTML 5 <tbody> Tag, Definition of <tbody> tag in html5


 

HTML 5 <tbody> Tag, Definition of <tbody> tag in html5

In this discussion, We will introduce about the use of <tbody> tag in html5.

In this discussion, We will introduce about the use of <tbody> tag in html5.

HTML 5 <tbody> Tag, Definition of <tbody> tag in html5

In this discussion, We will introduce about the use of <tbody> tag in html5. This tag is used to specify the group of rows in the table body. In the table we can have one or more <tbody> tag. The <tbody> tag is used in conjunction with <thead>, <tfoot> in the <table> tag. The <tbody> tag must have one or more <tr> tag within it. The <tbody> tag is the child of <table> tag and used after the <caption>, <thead>, <tfoot> tag. This tag must have opening and closing tags.

Declaration Syntax:

the syntax of the <tbody> tag is as:

<tbody>One or more tr tag</tbody>

This tag  don't have any specific attribute.

Example: tbody_tag.html.

<!DOCTYPE html>
<html>
<head>
<title>Example of tbody tag</title>
</head>
  <body>
         <table border="1">
                <thead>
                    <tr>
                        <th>NAME</th>
                        <th>Sr. name</th>
                   </tr>
             </thead>
             <tbody>
                   <tr>
                       <td> Gyan</td>
                       <td>  Singh</td>
                  </tr>
                  <tr>
                       <td> Ankit</td>
                       <td> Kumar</td>
                 </tr>
                 <tr>
                      <td> Bikrant</td>
                      <td> Singh</td>
                 </tr>
             </tbody>
        </table>
  </body> 
</html>

Output:

Download This Example:

Difference between html4.01 and html5.

None

Ads