@import url("reset.css");
@import url("index.css");
div{
background-color: aqua;
}
*{
padding: 0;
margin: 0;
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>06-30作业</title>
<link rel="stylesheet" href="main.css">
<style>
div label{
background-color: blue;
}
</style>
</head>
<body>
<!-- 1. 制作一个用户注册表单,将课堂上提到的表单控件全部用到;
2. 理解css模块的思想,并试写一个案例(选做)
3. 实例演示基本选择器与上下文选择器 4. 预习伪类选择器与常用元素的css样式设置,盒模型知识等 -->
<form action="" method="GET">
<!-- 表单 -->
<fieldset>
<lagend>必填项</lagend>
<div>
<label for="name">用户姓名:</label><input type="text" id="name" name="name">
</div>
<div>
<label for="tel">手机号码:</label><input type="tel" id="tel" name="tel">
</div>
<div>
<label for="email">收件邮箱:</label><input type="email" id="email" name="email" required>
</div>
<div>
<label for="pwd">登陆密码:</label><input type="password" id="pwd" name="pwd" required>
</div>
</fieldset>
<!-- 单选框 -->
<div>
<label for="secret">性别:</label>
<input type="radio" name="gender" id="male" value="male"><label for="male">男</label>
<input type="radio" name="gender" id="female" value="female"><label for="female">女</label>
<input type="radio" name="gender" id="secret" value="secret" checked><label for="secret">不清楚</label>
</div>
<!-- 多选框 -->
<div>
<label>爱好:</label>
<input type="checkbox" name="hobby[]" id="daqiu" value="daqiu"><label for="daqiu">打球</label>
<input type="checkbox" name="hobby[]" id="sign" value="sign"><label for="sign">唱歌</label>
<input type="checkbox" name="hobby[]" id="sleep" value="sleep" checked><label for="sleep">睡觉</label>
</div>
<!-- 下拉框 -->
<div>
<select name="siren" id="">
<option value="1">杜甫</option>
<option value="2">李白</option>
<option value="3">林冲</option>
<option value="4">斯巴特</option>
</select>
</div>
<!-- 下拉搜索框 -->
<div>
<input type="search" name="" id="" list="searchList">
<dataList id="searchList">
<option value="香蕉"></option>
<option value="葡萄"></option>
<option value="苹果"></option>
</dataList>
</div>
<input type="submit" value="提交">
</form>
</body>
</html>