<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>title</title> </head> <body> <h4>这个是不加cellpadding</h4> <table border="1"> <tr> <td>First</td> <td>Row</td> </tr> <tr> <td>Second</td> <td>Row</td> </tr> </table> <h4>下面这个是带cellpadding</h4> <table border="1" cellpadding="10"> <tr> <td>First</td> <td>Row</td> </tr> <tr> <td>Second</td> <td>Row</td> </tr> </table> <p>可以很清楚的看到cellpadding(补白,单元格内的内容和边框的距离)是表示内容和单元格的距离</p> <table border="1" cellspacing="10"> <tr> <td>First</td> <td>Row</td> </tr> <tr> <td>Second</td> <td>Row</td> </tr> </table> <p>cellspacing(单元格间距),代表的是单元格与单元格之间的距离</p> </body> </html>