Show Output
<!DOCTYPE html> <html lang="en"> <head> <title>HTML Table with Collapsed Borders</title> <style> table { border-collapse: collapse; } table, th, td { border: 1px solid black; } th, td { padding: 10px; } th { text-align: left; } </style> </head> <body> <h2>Table with Collapsed Borders</h2> <table> <tr> <th>No.</th> <th>Name</th> <th>Age</th> </tr> <tr> <td>1</td> <td>Peter Parker</td> <td>16</td> </tr> <tr> <td>2</td> <td>Clark Kent</td> <td>34</td> </tr> <tr> <td>3</td> <td>Harry Potter</td> <td>11</td> </tr> </table> <p><strong>Note:</strong> See the tutorial on <a href="/css-tutorial/css-tables.php" target="_top">CSS tables</a> to learn more about collapsing table borders.</p> </body> </html