文本类:
文本框 <input type = "text" />
密码框 <input type = "password" />
隐藏域 <input type = "hidden" />
文本域 <textarea></textarea>
按钮类:
普通按钮 <input type = "button" value = "text" />
提交按钮 <input type = "submit" value = "提交" />
重置按钮 <input type = "reset" value = "重置" />
图片按钮 <input type = "image" />
<button type="" name=></button>
选择类:
//同一个单选按钮组或者复选按钮组。name属性值要相同
//
<label> 标签为 input 元素定义标注(标记)。
label 元素不会向用户呈现任何特殊效果。不过,它为鼠标用户改进了可用性。如果您在 label 元素内点击文本,就会触发此控件。就是说,当用户选择该标签时,浏览器就会自动将焦点转到和标签相关的表单控件上。
<label> 标签的 for 属性应当与相关元素的 id 属性相同。
<input type = "radio" value = "1" id = "ra1">
<label for = "ra1">男</label>
<input type = "checkbox" value = "" id = ""><label for = ""></label>
<select>
<option vale = "1"></option>
</select>
<input type = "file" />
HTML5 增加了如下表单元素:
- <datalist>
- <keygen>
- <output>
注释:默认地,浏览器不会显示未知元素。新元素不会破坏您的页面。