<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单标签</title>
</head>
<body>
<form action="#" method="get" > <!-- 采集用户数据的范围 action="#"提交当前页面 method="get"请求参数会在地址栏显示 method="post"请求参数不会在地址栏显示,会封装在请求体中(http协议)-->
<label for="username">用户名:</label> <input name="username" type="text" placeholder="请输入用户名" id="username"><br> <!-- 表单内数据提交要用name属性 -->
密码: <input name="password" type="password"placeholder="请输入密码"><br>
性别: <input type="radio" name="gender" value="0" checked="checked">男 <!-- 多个单选name属性值必须一样 checked="checked"默认选中-->
<input type="radio"name="gender" value="1">女<br>
爱好: <input type="checkbox" name="hobby" value="shopping"/>逛街 <!-- 复选框 -->
<input type="checkbox" name="hobby" value="java"/>java
<input type="checkbox" name="hobby" value="game"/>游戏<br>
图片: <input type="file" name="file"><br>
隐藏域: <input type="hidden" name="id" value="aaa"><br>
取色器:<input type="color" name="color">
生日: <input type="date" name="birthday"/><br>
生日: <input type="datetime-local" name="birthday"/><br>
邮箱:<input type="email" name="email"><br>
年龄:<input type="number" name="age"><br>
省份:<select name="shengfen">
<option >北京</option>
<option >上海</option>
<option >广东</option>
</select><br>
文本域 :<textarea rows="5" cols="20" name="textarea">
</textarea><br>
<input type="submit" value="提交">
<input type="button" value="一个按钮"><br>
<input type="image" src="img/regbtn.jpg">
</body>
</html>
来源:https://www.cnblogs.com/987m/p/12199512.html