
- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
How to create table footer in HTML?
The HTML <tfoot> tag is used in adding a footer to a table. The tfoot tag is used in conjunction with the tbody tag and the thead tag in determining each part of the table (header, footer, body).
The following are the attributes −
Attribute | Value | Description |
---|---|---|
align | right left center justify char | Deprecated − Visual alignment. |
char | character | Deprecated − Specifies which character to align text on. Used when align = "char" |
charoff | pixels or % | Deprecated − Specifies an alignment offset (either in pixels or percentage value) against the first character as specified with the char attribute. Used when align = "char" |
valign | top middle bottom baseline | Deprecated− Vertical alignment. |
Example
You can try to run the following code to create a table footer in HTML −
<!DOCTYPE html> <html> <head> <style> table, td { border: 1px solid black; } </style> </head> <body> <table style = "width:100%"> <thead> <tr> <td colspan = "4">This is the head of the table</td> </tr> </thead> <tfoot> <tr> <td colspan = "4">This is the footer of the table</td> </tr> </tfoot> <tbody> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> </tr> <tr> ...more rows here containing four cells... </tr> </tbody> <tbody> <tr> <td>Cell 1</td> <td>Cell 2</td> <td>Cell 3</td> <td>Cell 4</td> </tr> <tr> ...more rows here containing four cells... </tr> </tbody> </table> </body> </html>
- Related Questions & Answers
- HTML DOM Footer object
- How to create table border in HTML?
- How to create table header in HTML?
- How to create table heading in HTML?
- In HTML how to create table header?
- How to create footer for Bootstrap 4 card
- How to create a fixed/sticky footer with CSS?
- Create a table in HTML
- How to create table rows & columns in HTML?
- Create caption for a table in HTML?
- How to add footer in Android ListView?
- Why prefer to put JavaScript in the footer of an HTML page?
- How do we create a footer for a document or section in HTML5?
- How to add footer view to android listview?
- How to merge table cells in HTML?
Advertisements