案例来源:黑马前端
代码:
<!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>
<h4>青春不常在,抓紧谈恋爱</h4>
<table width="600">
<tr>
<td>性别</td>
<td>
<input type="radio" name="sex" id="nan"><label for="nan"> 男</label>
<input type="radio" name="sex" id="nv"><label for="nv"> 女</label>
</td>
</tr>
<tr>
<td>生日</td>
<td>
<select>
<option selected="selected">-请选择年-</option>
<option>-2004-</option>
<option>-2003-</option>
<option>-2002-</option>
<option>-2001-</option>
</select>
<select>
<option>-请选择月份-</option>
<option>-12-</option>
<option>-11-</option>
<option>-10-</option>
<option>-9-</option>
</select> <select>
<option>-请选择日期-</option>
<option>-12-</option>
<option>-11-</option>
<option>-10-</option>
<option>-9-</option>
</select>
</td>
</tr>
<tr>
<td>所在地区</td>
<td>
<input type="text" placeholder="请输入所在地区">
</td>
</tr>
<tr>
<td>婚姻状况</td>
<td>
<input type="radio" id="未婚" name="婚姻状况">未婚
<input type="radio" id="丧偶" name="婚姻状况">丧偶
<input type="radio" id="离婚" name="婚姻状况">离婚
</td>
</tr>
<tr>
<td>学历</td>
<td>
<input type="text" placeholder="请输入学历">
</td>
</tr>
<tr>
<td>自我介绍</td>
<td>
<textarea></textarea>
</td>
</tr>
<tr>
<td></td>
<td>
<input type="button" value="免费注册">
</td>
</tr>
<tr>
<td></td>
<td>
<input type="checkbox" checked="checked">我同意条款
</td>
</tr>
<tr>
<td></td>
<td>
<a href="#">我是会员,立即登录</a>
</td>
</tr>
<tr>
<td></td>
<td>
<h5>我承诺</h5>
<ul>
<li>123</li>
<li>123</li>
<li>123</li>
</ul>
</td>
</tr>
</table>
</form>
</body>
</html>
案例效果: