標籤:style blog http color os io 使用 strong ar
資料分析,一般都需要顯示資料,就需要使用html做複雜的表格。複雜表格一般是對td的rowspan 、colspan屬性值。
在html中<td> 標籤定義 HTML 表格中的標準儲存格。
(1)rowspan 屬性規定儲存格可橫跨的行數;
(2)colspan 屬性規定儲存格可橫跨的列數。
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> 2 <html> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> 5 <title>複雜表格</title> 6 </head> 7 <body> 8 <center> 9 <table width = "20%" border="1">10 <tr>11 <th>網站</th>12 <th colspan="2">統計情況</th> <!-- colspan="2" 佔位,表示這一列佔2列 -->13 </tr>14 <tr>15 <td rowspan="3">奇虎360</td> <!-- rowspan="2" 佔位,表示這一列佔3行 -->16 <td>http://hao.360.cn/</td>17 <td>11</td>18 </tr>19 <tr>20 <td>http://sh.qihoo.com/</td>21 <td>22</td>22 </tr>23 <tr>24 <td>http://video.so.com/</td>25 <td>33</td>26 </tr>27 </table> 28 </center>29 </body>30 </html>
顯示:
rowspan 、colspan 可以理解為佔位。占行數、列數。
html 製作複雜table