HTML表格文档格式.docx
- 文档编号:16758591
- 上传时间:2022-11-25
- 格式:DOCX
- 页数:15
- 大小:17.63KB
HTML表格文档格式.docx
《HTML表格文档格式.docx》由会员分享,可在线阅读,更多相关《HTML表格文档格式.docx(15页珍藏版)》请在冰豆网上搜索。
/td>
4.<
row1,cell2<
5.<
/tr>
6.<
7.<
row2,cell1<
8.<
row2,cell2<
9.<
10.<
/table>
<
表格的表头
th>
Heading
AnotherHeading
row1,cell1
row1,cell2
row2,cell1
row2,cell2
源代码如下
tableborder="
Heading<
/th>
AnotherHeading<
row1,cell1<
row1,cell2<
11.<
row2,cell1<
12.<
row2,cell2<
13.<
14.<
表格中若有空单元格,可在空单元格中加一个空格占位符:
&
nbsp;
其它实例
1.带有标题的表格<
caption>
我的标题
100
200
300
400
500
600
html>
body>
h4>
Thetablehasacaptionandthickframe:
/h4>
6"
Mycaption<
/caption>
100<
200<
300<
400<
500<
600<
15.<
16.<
17.<
/body>
18.<
/html>
2.跨行或跨列的表格单元格
横跨两列的单元格:
Name
Tel
BillGates
55577854
55577855
横跨两行的单元格:
1.横跨两列的单元格:
Name<
thcolspan="
2"
Tel<
BillGates<
55577854<
55577855<
12.横跨两行的单元格
19.<
throwspan="
20.<
21.<
22.<
横跨两行的单元格
3.表格内的标签
Thisisaparagraph.
Thisisanotherparagraph.
Thisunitcontainsatable
A
B
C
D
Thisunitcontainsalist:
∙Apple
∙Banana
∙Pineapple
Hello
Code:
p>
Thisisaparagraph.<
/p>
Thisisanotherparagraph.<
A<
B<
C<
D<
ul>
23.<
li>
Apple<
/li>
24.<
Banana<
25.<
Pineapple<
26.<
/ul>
27.<
28.<
Hello<
29.<
30.<
<
Thisunitcontainsatable
4.单元格边距
Nocellpadding:
First
Row
Second
Withcellpadding:
First<
Row<
Second<
12.
13.
cellpadding="
10"
5.单元间隔距(cellspacing)
Withcellspacing:
cellspacing="
6.向表格添加背景颜色或图像
bgcolor="
red"
background="
/i/eg_bg.gif"
7.向表格单元格添加背景颜色或图像
tdbgcolor="
tdbackground="
8.在表格单元中排列内容
Consumeditem...
January
February
Clothes
$241.10
$50.20
Makeup
$30.00
$44.45
Food
$730.40
$650.00
Total
$1001.50
$744.65
tablewidth="
400"
border="
thalign="
left"
Consumeditem...<
right"
January<
February<
tdalign="
Clothes<
$241.10<
$50.20<
Makeup<
$30.00<
$44.45<
Food<
$730.40<
$650.00<
Total<
$1001.50<
$744.65<
9.Frame属性
Comment:
frame属性无法在InternetExplore中正确的显示
Tablewithframe="
box"
:
Month
Savings
$100
above"
below"
hsides"
vsides"
tableframe="
Month<
Savings<
$100<
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- HTML 表格