HTML表单初体验
使用表单对人口数据分类
- 表单结果如下:
2000-2005年人口分类数据代码如下:
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatiple" content="IE-edge" />
<meta name="viewpiont" content="width=device-width, initial-scale=1.0" />
<title>2000-2005年人口分类数据</title>
</head>
<body>
<!-- table 中的属性,如border,cellspacing...已被css替代,这里临时借用 -->
<table border="1" width="400" cellspacing="0" cellpadding="5">
<caption>
<h2>人口分类数据</h2>
</caption>
<thead bgcolor="lightblue" align="center">
<tr>
<td rowspan="3">年份</td>
<td rowspan="3">总人口(万人)</td>
<td colspan="4">按性别分</td>
<td colspan="4">按城乡分</td>
<td rowspan="3">出生率(%)</td>
<td rowspan="3">死亡率(%)</td>
<td rowspan="3">自然增长率(%)</td>
</tr>
<tr>
<td colspan="2">男</td>
<td colspan="2">女</td>
<td colspan="2">城镇</td>
<td colspan="2">乡村</td>
</tr>
<tr>
<td>总人口数(万人)</td>
<td>比重(%)</td>
<td>总人口数(万人)</td>
<td>比重(%)</td>
<td>总人口数(万人)</td>
<td>比重(%)</td>
<td>总人口数(万人)</td>
<td>比重(%)</td>
</tr>
</thead>
<tbody align="center">
<tr>
<td>2000</td>
<td>126743</td>
<td>65437</td>
<td>51.63</td>
<td>61306</td>
<td>48.37</td>
<td>45906</td>
<td>36.22</td>
<td>80837</td>
<td>63.78</td>
<td>14.03</td>
<td>6.45</td>
<td>7.58</td>
</tr>
<tr>
<td>2001</td>
<td>127627</td>
<td>65672</td>
<td>51.46</td>
<td>161955</td>
<td>48.54</td>
<td>48064</td>
<td>37.66</td>
<td>79563</td>
<td>62.34</td>
<td>13.38</td>
<td>6.43</td>
<td>6.95</td>
</tr>
<tr>
<td>2002</td>
<td>128453</td>
<td>66115</td>
<td>51.47</td>
<td>62338</td>
<td>48.53</td>
<td>50212</td>
<td>39.09</td>
<td>78241</td>
<td>60.91</td>
<td>12.86</td>
<td>6.41</td>
<td>6.45</td>
</tr>
<tr>
<td>2003</td>
<td>129227</td>
<td>66556</td>
<td>51.50</td>
<td>62671</td>
<td>48.50</td>
<td>52376</td>
<td>40.53</td>
<td>76851</td>
<td>59.47</td>
<td>12.41</td>
<td>6.4</td>
<td>6.01</td>
</tr>
<tr>
<td>2004</td>
<td>129988</td>
<td>66976</td>
<td>51.52</td>
<td>63012</td>
<td>48.48</td>
<td>54283</td>
<td>41.76</td>
<td>75705</td>
<td>58.24</td>
<td>12.29</td>
<td>6.42</td>
<td>5.87</td>
</tr>
<td>2005</td>
<td>130756</td>
<td>67375</td>
<td>51.53</td>
<td>63381</td>
<td>48.47</td>
<td>56212</td>
<td>42.99</td>
<td>74544</td>
<td>57.01</td>
<td>12.4</td>
<td>6.51</td>
<td>5.89</td>
</tbody>
<tfoot align="center" bgcolor="lightgray">
</tfoot>
</table>
</body>
</html>