好看的注册页面html代码
时间: 2023-08-10 15:02:11 浏览: 46
以下是一个简单的注册页面的 HTML 代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>注册页面</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<h1>注册页面</h1>
<form action="register.php" method="POST">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required><br>
<label for="email">电子邮件:</label>
<input type="email" id="email" name="email" required><br>
<label for="password">密码:</label>
<input type="password" id="password" name="password" required><br>
<label for="confirm_password">确认密码:</label>
<input type="password" id="confirm_password" name="confirm_password" required><br>
<input type="submit" value="注册">
</form>
</body>
</html>
```
这段代码包括一个标题、一个表单和四个输入字段(用户名、电子邮件、密码和确认密码)。表单将数据提交到 `register.php` 文件中进行处理。请注意,每个输入字段都有一个 `required` 属性,这样在提交表单之前必须填写所有字段。
相关推荐
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)