首页 > 代码库 > HTML表格(table)
HTML表格(table)
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <meta charset="utf-8">
5 <title>表格</title>
6 <link rel="stylesheet" type="text/css" href="">
7 </head>
8 <body>
9 <!-- 表格 -->
10 <table border="1" width="400px;" height="500px;">
11 <caption>表名</caption>
12 <!-- 表头th(table head) -->
13 <thead>
14 <tr>
15 <th>123</th>
16 <th>123</th>
17 <th>123</th>
18 <th>123</th>
19 <th>123</th>
20 <th>123</th>
21 <th>123</th>
22 </tr>
23 </thead>
24
25 <!-- 行tr(to right) -->
26 <tbody>
27 <tr border="1" style="text-align:center">
28 <!-- 列td(to down) -->
29 <td>123</td>
30 <td>123</td>
31 <td>123</td>
32 <td>123</td>
33 <td>123</td>
34 <td>123</td>
35 <!-- rowspan="数量(把多行合并成一行)-->
36 <td rowspan="2">123</td>
37 </tr>
38 <tr border="1" style="text-align:center">
39 <td>123</td>
40 <!-- colspan="数量(把多列合并成一列)-->
41 <td colspan="2">123</td>
42 <!-- <td>123</td> -->
43 <td>123</td>
44 <td>123</td>
45 <td>123</td>
46 <!-- <td>123</td> -->
47 </tr>
48 </tbody>
49 </table>
50 </body>
51 </html>
本文出自 “12145704” 博客,请务必保留此出处http://12155704.blog.51cto.com/12145704/1862618
HTML表格(table)