效果:
代码:
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style type="text/css">
.div_class{
background-color: #ccc;
}
.dox{
background-color: #ddd;
}
</style>
</head>
<body>
<table border="1" width="300" cellpadding="1" cellspacing="0">
<tr>
<td colspan="2" align="center" class="div_class">用户注册</td>
<!--<td></td>-->
</tr>
<tr class="dox">
<td align="right">用户名</td>
<td>
<form action="#" method="post">
<input type="text" name="name" id="" value="" />
</form>
</td>
</tr>
<tr class="dox">
<td align="right">密码</td>
<td>
<form action="#" method="post">
<input type="password" name="password" id="" value="" />
</form>
</td>
</tr>
<tr class="dox">
<td align="right">性别</td>
<td>
<form action="#">
<input type="radio" name="sex" value="男" />男
<input type="radio" name="sex" value="男" />女
</form>
</td>
</tr>
<tr>
<td align="right"></td>
<td></td>
</tr>
<tr class="dox">
<td align="right">爱好</td>
<td>
<form action="#">
<input type="checkbox" name="writinge" />写作
<input type="checkbox" name="sing" />听音乐
<input type="checkbox" name="pe" />体育
</form>
</td>
</tr>
<tr class="dox">
<td align="right">省份</td>
<td>
<form action="#" method="post">
<select name="省份" id="" multiple="" ">
<option >广州</option>
<option >深圳</option>
<option >西安</option>
<option >北京</option>
</select>
</form>
</td>
</tr>
<tr class="dox">
<td>自我介绍</td>
<td><textarea name="用户意见" id="" cols="10" rows="10"></textarea></td>
</tr>
<tr>
<td colspan="2" align="center" class="div_class">
<input type="submit"/>
<input type="reset" />
</td>
</tr>
</table>
</body>
</html>