表格中行与列的横跨问题及代码写法——供大家参考

来源:互联网 发布:apache tomcat6 linux 编辑:程序博客网 时间:2024/05/17 02:25

[html]代码库

<html>
 
<body>
<h4>横跨两列的单元格:</h4>
<table border="1">
  <tr>
    <th>姓名</th>
    <th colspan="2">电话</th>
  </tr>
  <tr>
    <td>Bill Gates</td>
    <td>555 77 854</td>
    <td>555 77 855</td>
  </tr>
</table>
<h4>横跨两行的单元格:</h4>
<table border="1">
  <tr>
    <th>姓名</th>
    <td>Bill Gates</td>
  </tr>
  <tr>
    <th rowspan="2">电话</th>
    <td>555 77 854</td>
  </tr>
  <tr>
    <td>555 77 855</td>
  </tr>
</table>
</body>
</html>
原创粉丝点击