<!DOCTYPE html> <html lang="en"> <head> <title>HTML Table with a Header, Footer, and Body</title> <style> table { border-collapse: collapse; } table, th, td { border: 4px solid black; } th, td { padding: 20px; text-align: left; } </style> </head> <body> <table> <thead> <tr> <th>Fruits</th> <th>Rate</th> <th>Qty</th> </tr> </thead> <tbody> <tr> <td>Apple</td> <td>100</td> <td>2</td> </tr> <tr> <td>Orange</td> <td>200</td> <td>1</td> </tr> <tr> <td>Banana</td> <td>150</td> <td>5</td> </tr> </tbody> <tfoot> <tr> <th>Total</th> <td colspan="2" style="text-align:center;">1150</td> </tr> </tfoot> </table> </body> </html>