表单元素
1. input(里面什么都能放,毫无限制)
单行文本框 <input type="text">
密码框 <input type="password">
单选按钮 <input type="radio">
复选按钮 <input type="checkbox">
附件 <input type="file">
提交按钮 <input type="submit">
h5拓展:搜索框,日期框,数字框,email框...
<input type="search">
<input type="date">
<input type="number">
<input type="email">
input的属性
type
name 参数的key(不能缺省)
value 参数的value(按钮的时候不能缺省)
placeholder 提示语
checked 用在单选按钮和复选按钮中表示默认选中
selected 用在下拉菜单中表示默认选中
【注意】:checked和selected可以为单值属性(布尔属性)
2. select
下拉菜单
<select name="shenfen">
<option value="shanxi">山西</option>
<option value="jiangxi">江西</option>
<option value="甘肃">甘肃</option>
</select>
select中的子元素一定为option,option中一般要添加value表示当选中该元素的时候,select的参数值为该value值,option中的value值可以不设置,那么value默认为文本值
3. textarea
多行文本域
<textarea name="" placeholder="" cols="30" rows="10"></textarea>
4. 插件(日期选择,地址选择,富文本)
实体
空格
大于号 >
小于号 <