1.table标签
<table align="center">
<caption>
人员名单
</caption>
<colgroup>
<col span="2" style="background-color: tomato;"> 注:第一列跟第二列元素背景色为tomato.
<col> 注:第三列元素未设置背景颜色
<col style="background-color: rgb(110, 139, 235);"> 注:为第四列元素设置背景颜色,由于没有第四列,所以未显示出来。
</colgroup>
<tr>
<th>姓名</th>
<th>性别</th>
<th>年龄</th>
</tr>
<tr>
<td>larry</td>
<td>男</td>
<td>28</td>
</tr>
<tr>
<td>Tarry</td>
<td>女</td>
<td>23</td>
</tr>
<tr>
<td>parry</td>
<td>女</td>
<td>21</td>
</tr>
</table>
标签介绍:
- caption:作为Table的子元素,表示表格得标题信息。
- colgroup:列分组,定义一个表中的一组列,作为Table的子元素,p放在caption的后面,其他元素的前面。
- col:经常作为colgroup的子元素,由span属性,规定几列为同一列。
2.表单标签
<form action="" method="GET">
<!-- 单行文本框 -->
用户名:<input type="text" name="username" id="username" autofocus placeholder="请输入用户名" required>
<br/>
<!-- 密码框 输入的内容会用小圆点替代展示 -->
密 码:<input type="password" name="password" id="password">
<br/>
<!-- 数字框 -->
年 龄:<input type="number" name="age" id="age" min="1" max="100">
<br/>
<!-- 复选框 -->
爱好:<input type="checkbox" name="like" id="music" value="music" checked>
<label for="music">听音乐</label>
<input type&