HTML tbody Tag
The <tbody> tag in HTML is used to make a group of the same type of content of body element. This tag is used in HTML table with header and footer which is known as “thead” and “tfoot”. <tbody> tag is child tag of table tag and parent tag of <tr> and <td> tags.
Syntax:
<tbody> // Table contents </tbody>
Attributes: Some attributes are supported by <tbody> tag in HTML4.1 but not supported in HTML5. The list of attributes is given below:
Example:
HTML
<!DOCTYPE html> < html > < body > < center > < h1 >w3wiki</ h1 > < h2 >tbody Tag</ h2 > < table > < thead > < tr > < th >Name</ th > < th >User Id</ th > </ tr > </ thead > <!-- tbody tag starts from here --> < tbody > < tr > < td >Shashank</ td > < td >@shashankla</ td > </ tr > < tr > < td >w3wiki</ td > < td >@Beginner</ td > </ tr > </ tbody > <!-- tbody tag ends here --> </ table > </ center > </ body > </ html > |
Output:
Supported Browsers:
- Google Chrome 1+
- Internet Explorer
- Firefox 1+
- Opera
- Safari
- Edge 12+
Contact Us