C
运行 »
×
下载代码
⇫
加载文件
改变主题,夜晚/白天
<!DOCTYPE html> <html> <head> <title> border-collapse property </title> <style> table{ border: 2px solid blue; text-align: center; font-size: 20px; width: 80%; height: 50%; } th{ border: 5px solid red; background-color: yellow; } td{ border: 5px solid violet; background-color: cyan; } #t1{ border-collapse: collapse; } </style> </head> <body> <h1> The border-collapse Property </h1> <h2> border-collapse: collapse; </h2> <table id = "t1"> <tr> <th> First_Name </th> <th> Last_Name </th> <th> Subject </th> <th> Marks </th> </tr> <tr> <td> James </td> <td> Gosling </td> <td> Maths </td> <td> 92 </td> </tr> <tr> <td> Alan </td> <td> Rickman </td> <td> Maths </td> <td> 89 </td> </tr> <tr> <td> Sam </td> <td> Mendes </td> <td> Maths </td> <td> 82 </td> </tr> </table> </body> </html>