代码如下:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>用户注册</title>
<style>
input[type="text"]{
width: 500px;
}
</style>
</head>
<body>
<form action="https://www.baidu.com" method="post">
<table border="1px" width="600px" height="400px" align="center" bgcolor="pink">
<tr>
<td colspan="8" align="center" height="30px">用户注册</td>
<!-- <td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="4" height="10px" align="center">用户名</td>
<!-- <td></td>
<td></td>
<td></td> -->
<td colspan="4" height="10px" align="left"><input type="text" name="username" id="username" value=""></td>
<!-- <td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="4" height="10px" align="center">密码</td>
<!-- <td></td>
<td></td>
<td></td> -->
<td colspan="4" height="10px" align="left"><input type="text" name="password" id="password" value=""></td>
<!-- <td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="4" height="10px" align="center">性别</td>
<!-- <td></td>
<td></td>
<td></td> -->
<td colspan="4" height="10px" align="left"><input type="radio" name="gender" value="" checked>男
<input type="radio" name="gender" value="">女</td>
<!-- <td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="4" height="10px" align="center">爱好</td>
<!-- <td></td>
<td></td>
<td></td> -->
<td colspan="4" height="10px" align="left"><input type="checkbox" name="hobby" value="" checked>写作
<input type="checkbox" name="hobby" value="" checked>听音乐
<input type="checkbox" name="hobby" value="" checked>体育</td>
<!-- <td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="4" height="10px" align="center">省份</td>
<!-- <td></td>
<td></td>
<td></td> -->
<td colspan="4" height="10px" align="left"> <select name="address">
<option value="shanxi">陕西省</option>
</select></td>
<!-- <td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="4" height="40px" align="center">自我介绍</td>
<!-- <td></td>
<td></td>
<td></td> -->
<td colspan="4" height="40px" align="left"><textarea name="introduce" rows="15"cols="55" placeholder=""></textarea>
<!-- <td></td>
<td></td>
<td></td> -->
</tr>
<tr>
<td colspan="8" height="10px" align="center"><button type="submit">提交</button>
<button type="reset">重置</button> </td>
<!-- <td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td>
<td></td> -->
</tr>
</table>
</form>
</body>
</html>
运行结果如下: