首页 热点资讯 义务教育 高等教育 出国留学 考研考公

html表格代码怎么写的

发布网友 发布时间:2022-04-22 01:27

我来回答

1个回答

热心网友 时间:2022-04-19 07:28

用到拆分合并单元格,手写挺麻烦的,先用dw在设计视图片实现,然后再返回代码视图,复制即可.代码如下:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

<table width="268" height="200" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="50" colspan="2" bordercolor="#0000FF"> </td>
<td rowspan="4" bordercolor="#0000FF"><table width="100%" height="200" border="1" cellpadding="0" cellspacing="0">
<tr>
<td height="75" bordercolor="#0000FF"> </td>
</tr>
<tr>
<td height="125" bordercolor="#0000FF"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="50" colspan="2" bordercolor="#0000FF"> </td>
</tr>
<tr>
<td height="50" bordercolor="#0000FF"> </td>
<td height="50" bordercolor="#0000FF"> </td>
</tr>
<tr>
<td height="50" bordercolor="#0000FF"> </td>
<td height="50" bordercolor="#0000FF"> </td>
</tr>
</table>

解释如下:
先插入四行两列的表格,第一列通过合并单元格来实现,第二列将所有单元格合并,然后新插入一个两行一列的表格即可实现上述效果.

声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com