1、 table标签
<body>
<table width="50%" height="200px" border="1" cellspacing="0" cellpadding="0" bgcolor="green" align="center">
<caption>我喜欢的歌曲</caption>
<thead>
<tr>
<th>歌名</th>
<th>作者</th>
</tr>
</thead>
<tbody>
<tr>
<td>咏春</td>
<td>七朵</td>
</tr>
<tr>
<td>千梦</td>
<td>阿杰</td>
</tr>
<tr>
<td>倩女幽魂</td>
<td rowspan="2">张国荣</td>
</tr>
<tr>
<td>与谁共鸣</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="2" align="right">歌曲数目:4</td>
</tr>
</tfoot>
</table>
</body>
2、form标签
- form标签的语法结构:
<form action="表单提交的地址" method="提交方法">
....文本框、按钮等表单元素...
</form>
- form标签的常用属性
- action:指定表单提交后由哪一个服务器程序处理,如果省略 action 属性,则 action 会被设置为当前页面。
- enctype:用于指定表单数据的编码方式
application/x-www-form-urlencoded:默认的编码方式,将表单控件中的数据编码成URL数据
multipart/form-data:以二进制方式处理数据
text/plain:以表单的action属性值为mailto:URL的形式处理 - method 属性规定在提交表单时所用的 HTTP 方法(GET 或 POST)
3、常用的表单元素:
4、input元素的常用属性
5、
<body>
<form name="regForm" action="https://www.baidu.com" method="post">
单行文本框<input type="text" name="username" id="username"/></br>
<label for="password">密码框</label><input type="password" name="password" id="password"/></br>
隐藏域<input type="hidden" name="hidden" id="hidden"/></br>
单选框<input type="radio" name="sex" id="male" checked="checked"/>男
<input type="radio" name="sex" id="female"/>女</br>
复选框<input type="checkbox" name="hobby" value="1" id="football"/>足球
<input type="checkbox" name="hobby" value="2" id="basketball"/>篮球
<input type="checkbox" name="hobby" value="3" id="pingbang"/>乒乓球
<input type="checkbox" name="hobby" value="4" id="running"/>跑步</br>
图像域<input type="image" src="QQ截图20170212200047.png" width="100px" height="70px"/></br>
文件上传域<input type="file" name="file"/></br>
提交按钮<input type="submit" name="submit" value="提交按钮"/></br>
重置按钮<input type="reset" name="reset" value="重置"/></br>
普通按钮<input type="button" name="button"value="普通按钮"/></br>
<button type="submit" name="sub1" value="提交按钮"><i>提交按钮</i></button></br>
<button type="reset" name="re" value="重置"><i>重置按钮</i></button>
</form>
</body>
- 列表框和下拉菜单
列表框:</br>
<select id="city" name="city" mutiple="mutiple" size="3">
<option>北京</option>
<option>上海</option>
<option>广州</option>
<option>深圳</option>
</select></br>
下拉菜单:</br>
<select id="cities" name="cities">
<option>北京</option>
<option>上海</option>
<option>广州</option>
<option>深圳</option>
</select>
- 媒体标签
<object width="400" height="40"
classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://fpdownload.macromedia.com/
pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0">
<param name="SRC" value="bookmark.swf">
<embed src="bookmark.swf" width="400" height="40"></embed>
</object>
详细内容可以参考以下网站:
参考网站