|

在圈子里看不出效果,請點擊查看原文欣賞!
1.
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD height=40> <DIV align=center>單行單列</DIV></TD>
</TR></TBODY></TABLE>
2.
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD width=100> <DIV align=center>一行多列</DIV></TD> <TD width=100> <DIV align=center>一行多列</DIV></TD> <TD width=100> <DIV align=center>一行多列</DIV></TD>
</TR></TBODY></TABLE>
3.
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD> <DIV align=center>一列多行</DIV></TD> <TR> <TD> <DIV align=center>一列多行</DIV></TD> <TR> <TD> <DIV align=center>一列多行</DIV></TD></TR></TR>
</TR></TBODY></TABLE>
4.
|
多行多列
|
多行多列
|
多行多列
|
|
多行多列
|
多行多列
|
多行多列
|
|
多行多列
|
多行多列
|
多行多列
|
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD width=100> <DIV align=center>多行多列</DIV></TD> <TD width=100> <DIV align=center>多行多列</DIV></TD> <TD width=100> <DIV align=center>多行多列</DIV></TD> <TR> <TD> <DIV align=center>多行多列</DIV></TD> <TD> <DIV align=center>多行多列</DIV></TD> <TD> <DIV align=center>多行多列</DIV></TD> <TR> <TD> <DIV align=center>多行多列</DIV></TD> <TD> <DIV align=center>多行多列</DIV></TD> <TD> <DIV align=center>多行多列</DIV></TD></TR></TR>
</TR></TBODY></TABLE>
5.
|
合并列的表格
|
|
合并列的表格
|
合并列的表格
|
合并列的表格
|
|
合并列的表格
|
合并列的表格
|
合并列的表格
|
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD colSpan=3> <DIV align=center>合并列的表格</DIV></TD> <TR> <TD width=100> <DIV align=center>合并列的表格</DIV></TD> <TD width=100> <DIV align=center>合并列的表格</DIV></TD> <TD width=100> <DIV align=center>合并列的表格</DIV></TD> <TR> <TD> <DIV align=center>合并列的表格</DIV></TD> <TD> <DIV align=center>合并列的表格</DIV></TD> <TD> <DIV align=center>合并列的表格</DIV></TD></TR></TR>
</TR></TBODY></TABLE>
6.
|
合并行的表格
|
合并行的表格
|
合并行的表格
|
|
合并行的表格
|
合并行的表格
|
|
合并行的表格
|
合并行的表格
|
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD width=100 rowSpan=3> <DIV align=center>合并行的表格</DIV></TD> <TD width=100> <DIV align=center>合并行的表格</DIV></TD> <TD width=100> <DIV align=center>合并行的表格</DIV></TD> <TR> <TD> <DIV align=center>合并行的表格</DIV></TD> <TD> <DIV align=center>合并行的表格</DIV></TD> <TR> <TD> <DIV align=center>合并行的表格</DIV></TD> <TD> <DIV align=center>合并行的表格</DIV></TD></TR></TR>
</TR></TBODY></TABLE>
7.
|
復(fù)雜表格
|
復(fù)雜表格
|
復(fù)雜表格
|
|
復(fù)雜表格
|
復(fù)雜表格
|
復(fù)雜表格
|
復(fù)雜表格
|
復(fù)雜表格
|
|
復(fù)雜表格
|
復(fù)雜表格
|
復(fù)雜表格
|
|
復(fù)雜表格
|
復(fù)雜表格
|
復(fù)雜表格
|
|
復(fù)雜表格
|
復(fù)雜表格
|
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#000000 cellSpacing=0 width=300 align=center bgColor=#ffffff border=1> <TBODY> <TR> <TD width=60> <DIV align=center>復(fù)雜表格</DIV></TD> <TD width=180 colSpan=3> <DIV align=center>復(fù)雜表格</DIV></TD> <TD width=60> <DIV align=center>復(fù)雜表格</DIV></TD> <TR> <TD rowSpan=4> <DIV align=center>復(fù)雜表格</DIV></TD> <TD rowSpan=3> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TR> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TR> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TR> <TD> <DIV align=center>復(fù)雜表格</DIV></TD> <TD colSpan=3> <DIV align=center>復(fù)雜表格</DIV></TD>
</TR></TR></TR></TR>
</TR></TBODY></TABLE>
8.
| 隱藏 |
橫向 |
分隔線 |
| 隱藏 |
橫向 |
分隔線 |
| 隱藏 |
橫向 |
分隔線 |
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#ff0033 cellSpacing=0 rules=cols width=300 align=center bgColor=#e1f8ff border=1> <TBODY> <TR> <TD width=100>隱藏</TD> <TD width=100>橫向</TD> <TD width=100>分隔線</TD> <TR> <TD>隱藏</TD> <TD>橫向</TD> <TD>分隔線</TD> <TR> <TD>隱藏</TD> <TD>橫向</TD> <TD>分隔線</TD></TR></TR>
</TR></TBODY></TABLE>
9.
| 隱藏 |
縱向 |
分隔線 |
| 隱藏 |
縱向 |
分隔線 |
| 隱藏 |
縱向 |
分隔線 |
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#ff0033 cellSpacing=0 rules=rows width=300 align=center bgColor=#e1f8ff border=1> <TBODY> <TR> <TD width=100>隱藏</TD> <TD width=100>縱向</TD> <TD width=100>分隔線</TD> <TR> <TD>隱藏</TD> <TD>縱向</TD> <TD>分隔線</TD> <TR> <TD>隱藏</TD> <TD>縱向</TD> <TD>分隔線</TD></TR></TR>
</TR></TBODY></TABLE>
10.
| 隱藏 |
縱橫 |
分隔線 |
| 隱藏 |
縱橫 |
分隔線 |
| 隱藏 |
縱橫 |
分隔線 |
代碼:
<TABLE style="BORDER-COLLAPSE: collapse" borderColor=#ff0033 cellSpacing=0 rules=none width=300 align=center bgColor=#e1f8ff border=1> <TBODY> <TR> <TD width=100>隱藏</TD> <TD width=100>縱橫</TD> <TD width=100>分隔線</TD> <TR> <TD>隱藏</TD> <TD>縱橫</TD> <TD>分隔線</TD> <TR> <TD>隱藏</TD> <TD>縱橫</TD> <TD>分隔線</TD></TR></TR>
</TR></TBODY></TABLE>
<TABLE borderColor=#111111 bgColor=#FFD2D2 cellSpacing=0 cellPadding=0 width=250 align=center border=1 frame=rhs> <TBODY> <TR align=middle> <TD height=40>只顯示右邊框</TD>
</TR></TBODY></TABLE>
附:表格常用屬性
border:表格的邊框?qū)挾?。如border=1,表示表格邊框的粗細為1個像素(默認值),為0表示沒有邊框。 cellspacing:表格中各單元格的間距。屬性值為數(shù)字。當(dāng)表格只有一個單元格時,則表示該單元格與表格邊框的距離。 cellpadding:單元格內(nèi)容與單元格邊框之間的距離,屬性值是數(shù)字。 width:表格的寬度。屬性值為像素和百分比兩種。 height:表格的高度。取值方法同width。 bgcolor:表格的背景顏色。屬性值為各種顏色代碼。 background:表格的背景圖案。屬性值為有效的圖片地址。 bordercolor:表格邊框的顏色。屬性值為各種顏色代碼(當(dāng)border值不為0時設(shè)置此值有效)。 bordercolorlight:亮邊框(表格的左邊和上邊框)顏色。屬性值為各種顏色代碼(當(dāng)border值不為0時設(shè)置此值有效)。 bordercolordark:暗邊框(表格的右邊和下邊框)顏色。屬性值為各種顏色代碼(當(dāng)border值不為0時設(shè)置此值有效)。 align:表格的對齊方式。屬性值為left(左對齊,默認)、center(居中)以及right(右對齊)。 colspan:定義合并表格的列數(shù)。屬性值是數(shù)字。 rowspan定義合并表格的行數(shù),屬性值是數(shù)字。
|