HTML tbody tag
- 24-07-2022
- Trung Minh
- 0 Comments
The tbody tag defines the body or main body of the table.
The tbody tag is used in conjunction with thead and tfoot tags to specify each part of the table (header, body, footer).
Web browsers can use this element to allow scrolling of the body of the table without regard to thead or tfoot. In some cases where the table data is large and spans many pages, these elements can help thehead and tfoot be printed at the top and bottom of the page.
When using tbody tags you must note that they must be children of the table tag and must be placed after all caption, colgroup and thead tags.
Using
For example , use the tbody tag to specify the contents of a table.
<!DOCTYPE html> <html> <head> <meta charset="utf-8"> </head> <body> <h1>Học html miễn phí tại web888.vn</h1> <table> <thead> <tr> <th>Tên Thẻ</th> <th>Mô tả</th> </tr> </thead> <tfoot> <tr> <td>Tổng</td> <td>3 Thẻ</td> </tr> </tfoot> <tbody> <tr> <td>a</td> <td>tạo siêu liên kết</td> </tr> <tr> <td>p</td> <td>định nghĩa một đoạn văn bản</td> </tr> <tr> <td>br</td> <td>ngắt dòng hiện tại</td> </tr> </tbody> </table> </body> </html>