-
Notifications
You must be signed in to change notification settings - Fork 0
/
表格.html
243 lines (233 loc) · 4.08 KB
/
表格.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<meta charset= "utf-8">
<html>
<head>
<title>表格</title>
</head>
<body>
<p>
每个表格从一个table标签开始
每个表格行从tr标签开始
每个表格的数据从td的标签开始
</p>
<h4>一列:</h4>
<table border="1">
<tr>
<td>1</td>
</tr>
</table>
<h4>一行三列</h4>
<table border="1">
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
<h4>两行三列</h4>
<table border="1">
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
</table>
<h4>水平标题</h4>
<table border="1">
<tr>
<th>name</th>
<th>telephone</th>
<th>telephone</th>
</tr>
<td>conky</td>
<td>123456</td>
<td>123456</td>
</table>
<h4>垂直标题</h4>
<table border="1">
<tr>
<th>frist name</th>
<td>123456</td>
</tr>
<tr>
<th>telephone</th>
<td>123456</td>
</tr>
<tr>
<th>telephone</th>
<td>123456</td>
</tr>
</table>
<table border="1">
<caption>monthly savings</caption>
<tr>
<th>month</th>
<th>savings</th>
</tr>
<tr>
<td>1</td>
<td>50$</td>
</tr>
<tr>
<td>2</td>
<td>100$</td>
</tr>
</table>
<h4>单元跨两格</h4>
<table border="1">
<tr>
<th>Name</th>
<th colspan="2">Telephone</th>
</tr>
<tr>
<td>BILL gates</td>
<td> 123 456</td>
<td>123456 </td>
</tr>
</table>
<h4>单元格夸两列</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>
<table border="1">
<tr>
<td>
<P>这是一个段落</P>
<P>这是另外一个段落</P>
</td>
<td> 这个单元格包含一个表格
<table border="1">
<tr>
<td>A</td>
<td>B</td>
</tr>
<tr>
<td>
C
</td>
<td>D</td>
</tr>
</table>
</td>
<tr>
<td>这个单元格包含一个列表
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
</ul>
</td>
<td>HELLO</td>
</tr>
</table>
<h4>没有单元格边距</h4>
<table border="1">
<tr>
<td>第一</td>
<td>ton</td>
</tr>
<tr>
<td>第二</td>
<td>hi</td>
</tr>
</table>
<h4>有单元格边距</h4>
<table border="1" cellpadding="10">
<tr>
<td>第一</td>
<td>ton</td>
</tr>
<tr>
<td>第二</td>
<td>hi</td>
</tr>
</table>
<h4>没有单元格间距</h4>
<table border="1">
<tr>
<td>第一</td>
<td>ton</td>
</tr>
<tr>
<td>第二</td>
<td>hi</td>
</tr>
</table>
<h4>单元格间距为0</h4>
<table border="1" cellspacing="0">
<tr>
<td>第一</td>
<td>ton</td>
</tr>
<tr>
<td>第二</td>
<td>hi</td>
</tr>
</table>
<h4>单元个间距为10</h4>
<table border="1" cellspacing="10">
<tr>
<td>第一</td>
<td>ton</td>
</tr>
<tr>
<td>第二</td>
<td>hi</td>
</tr>
</table>
<h4>有序列表:</h4>
<ol>
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ol>
<ol start="20" >
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ol>
<h4>无序列表:</h4>
<ul>
<li>咖啡</li>
<li>茶</li>
<li>牛奶</li>
</ul>
<h4>自定义列表:</h4>
<dl>
<dt>咖啡</dt>
<dd>-加热加糖</dd>
<dt>牛奶</dt>
<dd>-颜色是白色的</dd>
</dl>
<h4>嵌套列表:</h4>
<ul>
<li>咖啡</li>
<li>茶</li>
<ul>
<li>绿茶</li>
<li>红茶</li>
<ul>
<li>中国</li>
<li>非洲</li>
</ul>
</ul>
<li>牛奶</li>
</ul>
</body>
</html>