作业2-html注册页面和课程表
16lz
2021-03-21
作业1-课程表
<!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>作业表格</title>
<style>
tr {
text-align: center;
}
</style>
</head>
<body>
<table
border="1px"
cellspacing="0"
width="30%"
align="center"
cellpadding="5"
>
<caption style="font-weight: bolder; margin-bottom: 1em; font: size 2px">
作业-课程表
</caption>
<tr>
<th>时间</th>
<th>星期一</th>
<th>星期二</th>
<th>星期三</th>
<th>星期四</th>
<th>星期五</th>
</tr>
<tr>
<td
rowspan="3"
bgcolor="lightblue"
style="font-weight: bolder; font: size 2px"
>
上午
</td>
<td>语文</td>
<td>数学</td>
<td>音乐</td>
<td>体育</td>
<td>英语</td>
</tr>
<tr>
<!-- <td>上午</td> -->
<td>语文</td>
<td>数学</td>
<td>音乐</td>
<td>体育</td>
<td>英语</td>
</tr>
<tr>
<!-- <td>上午</td> -->
<td>语文</td>
<td>数学</td>
<td>音乐</td>
<td>体育</td>
<td>英语</td>
</tr>
<tr>
<td colspan="6" bgcolor="lightgrey">中午休息</td>
<!-- <td></td>
<td></td>
<td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td
rowspan="2"
bgcolor="lightblue"
style="font-weight: bolder; font: size 2px"
>
下午
</td>
<td>语文</td>
<td>数学</td>
<td>音乐</td>
<td>体育</td>
<td>英语</td>
</tr>
<tr>
<!-- <td>下午</td> -->
<td>语文</td>
<td>数学</td>
<td>音乐</td>
<td>体育</td>
<td>英语</td>
</tr>
<tr>
<td bgcolor="lightgreen">备注:</td>
<td colspan="5" bgcolor="lightgreen">
每天下午16:00-17:00,写完作业再回家
</td>
<!-- <td></td>
<td></td>
<td></td>
<td></td> -->
</tr>
</table>
</body>
</html>
效果图:
作业2-注册页面
<!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>注册页面</title>
</head>
<body >
<form action="" style:"display:grid; gap:0.5em" method="POST" align="center">
<!-- 文本输入框 -->
<div><label for="username">账号:</label>
<input type="text" id="username" autofocus required placeholder="必须是6-8位"/> </div>
<div>
<label for="password">密码:<input type="password" name="" id="password" autofocus required placeholder="必须是字母+数字"/>
</label><br>
<label for="password">确认密码: <input type="password" name="" id="confirmPassword" autofocus required placeholder="必须是字母+数字"/>
</label>
</div>
<div>
<label for="email">邮箱:</label>
<input type="email" name="email" id="email" placeholder="xxx@qq.com">
<div>
<!-- 单选框 for默认值绑定id -->
<label for="secret">性别</label>
<!-- id和for绑定 -->
<input type="radio" name="gender" value="male" id="male"><label for="male">男</label>
<input type="radio" name="gender" value="female" id="female"><label for="female">女</label>
<input type="radio" name="gender" value="secret" id="secret" checked><label for="secret">保密</label>
</div>
<div>
<!-- 复选框 -->
<!-- 因为允许同时提交多个值,所以name属性要写成数组格式 -->
<label for="">爱好</label>
<input type="checkbox" name="hobby[]" id="programmer" checked><label for="programmer">PHP</label>
<input type="checkbox" name="hobby[]" id="game"><label for="game">游戏</label>
<input type="checkbox" name="hobby[]" id="trave"><label for="trave">旅游</label>
<input type="checkbox" name="hobby[]" id="shot"><label for="shot">摄影</label>
</div>
<div>
<label for="">会员等级:</label>
<select name="level" id="">
<option value="1">铜牌会员</option>
<option value="2">银牌会员</option>
<option value="3" selected>金牌会员</option>
<option value="4">钻石会员</option>
</select>
</div>
<!-- datalist 输入框+下拉列表-->
<div>
<label for="">关键字:</label>
<!-- list和datalist的id进行绑定 -->
<input type="search" name="search" id="" list="my-key">
<datalist id="my-key">
<option value="html"></option>
<option value="css"></option>
<option value="js"></option>
</datalist>
</div>
<div><button type="submit">立即注册</button></div>
</form>
</body>
</html>