示例如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>表单</title>
</head>
<body>
<form>
用户名:
<input type="text">
<br/>
密码:
<input type="password">
<br/>
你喜欢的水果有?
<br/>
苹果<input type="checkbox"> <!--复选框-->
西红柿<input type="checkbox">
香蕉<input type="checkbox">
<br/>
请选择您的性别:
男<input type="radio" name="sex"> <!--单选框-->
女<input type="radio" name="sex">
<br/>
请选择您常用的网站
<select> <!--下拉列表-->
<option>www.jikexueyuan.com</option>
<option>www.google.com</option>
<option>www.zhang.com</option>
</select>
<input type="button"value="按钮">
<input type="submit" value="确定">
</form>
<textarea cols="30" rows="30">请在此填写个人信息</textarea> <!--文本域-->
</body>
</html>
运行效果如下: