form
<input type="text","password","reset" "submit">
多选框
input type="checkbox"
选中的加checked
下拉框
<p>
<select name="">
<option> </option>
</select>
</p>
文本域 textarea
文件域:<input type="textarea">
邮件: email
url: url
数字: type=number
滑块
input type="range" name="voice" min="0" max="100" step="2"
搜索框
input type="search"
readonly 只读
disabled
hidden
增强鼠标可用性
label type="mark"
表单验证:
placeholder 提示信息
required 提示不能为空
pattern 正则表达式
本文详细介绍了HTML中各种表单元素的用法,包括文本输入、密码输入、复选框、下拉框、文本域、文件域、电子邮件、URL、数字、滑块、搜索框等。还提到了表单验证的相关属性如placeholder、required和pattern,以及增强鼠标可用性的label元素。此外,文章还涵盖了readonly、disabled和hidden属性的使用。

被折叠的 条评论
为什么被折叠?



