表格
一个<tr></tr>等于一行
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Document</title> </head> <style> #a1 { width: 200px; height: 10px; } </style> <body> <table border="1" align="center" id="a1"> <tr> <td>A1</td> <td>A2</td> <td>A3</td> <td>A4</td> </tr> <tr> <td>B1</td> <td>B2</td> <td>B3</td> <td>B4</td> </tr> <tr> <td>C1</td> <td>C2</td> <td>C3</td> <td>C4</td> </tr> </table> </body> </html>
如果把其中一个格子去掉其他格子也不会占满
表格分为三部分:
头部:thead
主体:tbody
底部:tfoot