Toggle navigation
☰
HTML
CSS
Scripting
Database
<!DOCTYPE html> <html> <head> <title>Table Headers and Captions Example</title> <style> body { font-family: sans-serif; margin: 20px; } table { width: 100%; border-collapse: collapse; } table, th, td { border: 1px solid #ccc; } th, td { padding: 10px; text-align: left; } /* Style the header row slightly differently */ th { background-color: #f1f1f1; color: #333; } /* Style the caption */ caption { font-weight: bold; font-size: 1.2em; padding: 10px; color: #007bff; } </style> </head> <body> <table> <caption>Monthly Savings Goal</caption> <tr> <th scope="col">Month</th> <th scope="col">Target</th> <th scope="col">Actual Saved</th> </tr> <tr> <td>January</td> <td>$200</td> <td>$250</td> </tr> <tr> <td>February</td> <td>$200</td> <td>$180</td> </tr> <tr> <td>March</td> <td>$200</td> <td>$210</td> </tr> </table> </body> </html>