HTML table表格边框的控制详细说明

只显示上边框 <table frame=above>
只显示下边框 <table frame=below>
只显示左、右边框 <table frame=vsides>
只显示上、下边框 <table frame=hsides>
只显示左边框 <table frame=lhs>
只显示右边框 <table frame=rhs>
不显示任何边框 <table frame=void>

复制代码代码如下:
<html>
<head>
<title>表格边框的隐藏</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
body { color:"#ffffff";
font-family: "宋体";
font-size: 12px;
margin-top : 4;
}
.t {
border: #000000; border-style: solid; border-width: 1px
}
td {
font-family: "Tahoma", "MS Shell Dlg"; font-size: 12px
}
textarea {border: 1 solid #000000"}
</style>
</head>
<body bgcolor="#999999" text="#000000">
<center>
<table width="600" border="0" cellspacing="0" cellpadding="8" class="t">
<tr>
<td>
<table border="1" width="200" cellpadding="0" cellspacing="0">
<tr align="center">
<td>普</td>
<td>表</td>
</tr>
<tr align="center">
<td>通</td>
<td>格</td>
</tr>
</table>
</td>
<td>这是一普通的表格</td>
</tr>
<tr>
<td>

<table width="200" border="1" cellspacing="0" cellpadding="0" frame=above>
<tr align="center">
<td>头</td>
<td>上</td>
</tr>
<tr align="center">
<td>有</td>
<td>天</td>
</tr>
</table>

</td>
<td>只显示上边框</td>
</tr>
<tr>
<td>
<table width="200" border="1" cellspacing="0" cellpadding="0" frame=below>
<tr>
<td align="center">脚</td>
<td align="center">下</td>
</tr>
<tr>
<td align="center">有</td>
<td align="center">地</td>
</tr>
</table>
</td>
<td>只显示下边框</td>
</tr>
<tr>
<td>

<table width="200" border="1" cellspacing="0" cellpadding="0" frame=vsides>
<tr>
<td align="center">上不着天</td>
<td>&nbsp;</td>
</tr>
<tr>
<td>&nbsp;</td>
<td align="center">下不着地</td>
</tr>
</table>

</td>
<td>只显示左、右边框</td>
</tr>
<tr>
<td>
<table border="1" cellspacing="0" cellpadding="0" frame=hsides width="200">
<tr>
<td align="center">去掉两边</td>
<td></td>
</tr>
<tr>
<td></td>
<td align="center">只剩“王”字</td>
</tr>
</table>
</td>
<td>只显示上、下边框</td>
</tr>
<tr>
<td>

<table width="200" border="1" cellspacing="0" cellpadding="0" frame=lhs>
<tr>
<td width="100" align="center">只</td>
<td width="100" align="center">有</td>
</tr>
<tr>
<td align="center">左</td>
<td align="center">边</td>
</tr>
</table>

</td>
<td>只显示左边框</td>
</tr>
<tr>
<td>
<table width="200" border="1" cellspacing="0" cellpadding="0" frame=rhs>
<tr>
<td width="100" align="center">只</td>
<td width="100" align="center">有</td>
</tr>
<tr>
<td align="center">右</td>
<td align="center">边</td>
</tr>
</table>
</td>
<td>只显示右边框</td>
</tr>
<tr>
<td>

<table width="200" border="1" cellspacing="0" cellpadding="0" frame=void>
<tr>
<td align="center">四周</td>
<td align="center">去掉</td>
</tr>
<tr>
<td align="center">只留</td>
<td align="center">中间</td>
</tr>
</table>
</td>
<td>不显示任何边框</td>
</tr>
<tr>
<td colspan="2">
<hr size="1" color=black>
表格边框的显示与隐藏,是可以用frame参数来控制的。请注意它只控制表格的边框图,而不影晌单元格。

只显示上边框 &lt;table frame=above&gt;

只显示下边框 &lt;table frame=below&gt;

只显示左、右边框 &lt;table frame=vsides&gt;

只显示上、下边框 &lt;table frame=hsides&gt;

只显示左边框 &lt;table frame=lhs&gt;

只显示右边框 &lt;table frame=rhs&gt;

不显示任何边框 &lt;table frame=void&gt;</td>
</tr>
</table>
</center>
</body>
</html>

HTML table表格边框的控制详细说明