1. div回顾:
<div id="...." style="backgroud-color:....; width:..px;height:....px; float:left/right;text-align:...."> text </div>
2. 设置网页的背景图片;
<head>
<style type="text/css">
body{ background-img:url (图片的url); }
</style>
</head>
3. html的输入与表单
HTML 表单格式:
<form>
<!--input--!>
<form>
1) 创建文本字段输入框与创建密码字段输入框
<form>
Username:<input type="text" name="usrname"> <br> <br>
Password:<input type="password" name="password">
</form>
2) <form action="url"> 绝对url与相对url
action表示把表单的数据向action中的地址传送,无特殊说明则为本页。
3)单选按钮radio buttons(内联元素);
基本格式:
<form>
<input type="radio" name="subject" value="math" >math <br/>
<input type="radio" name="subject" value="physics" >psysics <br/>
<input type="radio" name="subject" value="chinese"> chinese <br/>
</form>
注:同一个内容的选择name中的内容要相同,否则就失去了单选的效果
4)复选按钮checkboxes
格式:
<form>
<input type="checkbox" name="vehicle" value="bus" style="width:40px;height:40px">bus <br/>
<input type="checkbox" name="vehicle" value="boat" style="width:40px;height:40px" >boat <br/>
<input type="checkbox" name="vehicle" value="plane" style="width:40px;height:40px">plane <br>
</form>
5)submit提交按钮
基本格式:
<form action="table1.html" method="get">
Username: <input type="text" style="width:400px;height:60px">
<input type="submit" name="submit" style=" width:70px;height:60px">
</form>
6)可选择内容的按钮
基本格式:
<form >
<select name="options">
<option value="one" ><h >one</h></option> <br/>
<option value="two">two </option> <br/>
<option valye="three">three</option> <br/>
<option value="four">four</option> <br/>
</select>
</form>