Last Updated on April 26, 2023 by Roshan Parihar
Definition: HTML tbody tag is used to specify the main content part of the table.
The tbody tag used with the HTML thead tag and HTML tfoot tag to create data in tabular form. The browser uses this table content part to enable scrolling independently of the header and footer.
You should also learn these terms:
- HTML caption tag use to show the table titles.
- HTML colgroup tag to show a group of columns at the same time in tables.
Table of Content
Syntax:
1 |
<tbody>table main content comes here with rows and its cells</tbody> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
<p>Computer software list:</p> <table> <thead> <tr> <th>Sr. No.</th> <th>name</th> </tr> </thead> <tbody> <tr> <td>1</td> <td>Video player software</td> </tr> <tr> <td>2</td> <td>Google Chrome browser</td> </tr> <tr> <td>3</td> <td>VLC media player</td> </tr> </tbody> <tfoot> <tr> <td>4</td> <td>DVD writer software</td> </tr> </tfoot> </table> |
Output
Computer software list:
Sr. No. | name |
---|---|
1 | Video player software |
2 | Google Chrome browser |
3 | VLC media player |
4 | DVD writer software |
Element Specific Attributes
Sr. No. | Attribute Name | Description |
---|---|---|
1 | align | The attribute is used to specify the alignment of the main content of the table.
|
2 | char | The attribute is used for the main content of a table only when the value of the align attribute is char (align=”char”).
|
3 | charoff | Use this attribute only after you specify align=”char”. This specifies an alignment offset against the first character with this attribute.
|
4 | valign | This defines the vertical alignment of the main content of the table.
|
Resources and References
1. W3C Specification.
2. HTML living standard
3. W3C project using Github