html form标签怎么用?
html form标签用于为用户输入创建 html 表单,表单可以用于向服务器传输数据。
说明:表单能够包含 input 元素,比如文本字段、复选框、单选框、提交按钮等等。表单还可以包含 button、select、option、optgroup、menus、textarea、fieldset、legend 和 label 元素。表单用于向服务器传输数据。
注释:form 元素是块级元素,其前后会产生折行。
html form标签 示例
<!doctype html><html><body><form action=""> 用户名:<br> <input type="text" name="firstname" value="mickey"> <br><br> 密码:<br> <input type="password" name="password"> <br><br> <input type="submit" value="提交"></form></body></html>
输出:
以上就是html form标签怎么用的详细内容。
