一:基本表格<table>.......tr....th....td......</table>
<TABLE borderColor=red border=10> <TBODY> <TR> <TH>姓名</TH> <TH>性别</TH> <TH>年龄</TH> <TR> <TD>王林</TD> <TD>男</TD> <TD>25</TD></TR></TBODY></TABLE>
二:表格宽度 width <table border=2 width="200">
三:单元格间线宽度
<table border=3 cellspacing=15>
<caption>定货单</caption> <tr><th>苹果</th><th>香蕉</th><th>葡萄</th> <tr><td>200公斤</td><td>200公斤</td><td>100公斤</td> </table>
四:内容与格线之间的宽度
<table border=3 cellpadding=5> <caption>定货单</caption> <tr><th>苹果</th><th>香蕉</th><th>葡萄</th> <tr><td>200公斤</td><td>200公斤</td><td>100公斤</td> </table>
五:表格内容居左,居中,居右(左右排列)
六:上下排列 <table border=1 width="250" height="100">
七:跨多行,多列 跨多列的表元 <th colspan=#> <td colspan=#> 跨多行的表元 <th rowspan=#> <td rowspan=#>
rowspan所要表示的意义是指跨越的行数,例如rowspan=2就表示这一格跨越表格两个行的高度。 <html> <head> <title>表格TABLE</title> </head> <table border> <tr><th colspan=3>值班人员 </th> <tr><th>星期一</th> <th>星期二</th> <th>星期三</th> <tr><td>李强</td><td>张明</td><td>王平</td> </table> </html>
|
|