20090402

如何定义跨行或者跨列的单元格(合并单元格)


<html>

<body>

<h4>Cell that spans two columns:</h4>

<table border="1">

<tr>

<th>Name</th>


<th colspan="2">Telephone</th>

</tr>

<tr>

<td>Bill Gates</td>

<td>555 77 854</td>


<td>555 77 855</td>

</tr>

</table>

<h4>Cell that spans two rows:</h4>

<table border="1">

<tr>


<th>First Name:</th>

<td>Bill Gates</td>

</tr>

<tr>

<th rowspan="2">Telephone:</th>


<td>555 77 854</td>

</tr>

<tr>

<td>555 77 855</td>

</tr>

</table>


</body>

</html>





显示效果:

Cell that spans two columns:
















Name Telephone
Bill Gates 555 77 854 555 77 855

Cell that spans two rows:














First Name: Bill Gates
Telephone: 555 77 854
555 77 855

没有评论:

发表评论