html登录注册页面代码
时间: 2023-11-03 09:06:00 浏览: 41
以下是一个简单的 HTML 登录注册页面代码示例:
登录页面代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
</head>
<body>
<h1>Login</h1>
<form action="login.php" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username"><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password"><br><br>
<input type="submit" value="Login">
</form>
<p>Don't have an account? <a href="register.html">Register here</a></p>
</body>
</html>
```
注册页面代码:
```html
<!DOCTYPE html>
<html>
<head>
<title>Register Page</title>
</head>
<body>
<h1>Register</h1>
<form action="register.php" method="post">
<label for="username">Username:</label>
<input type="text" id="username" name="username"><br><br>
<label for="email">Email:</label>
<input type="email" id="email" name="email"><br><br>
<label for="password">Password:</label>
<input type="password" id="password" name="password"><br><br>
<label for="confirm_password">Confirm Password:</label>
<input type="password" id="confirm_password" name="confirm_password"><br><br>
<input type="submit" value="Register">
</form>
<p>Already have an account? <a href="login.html">Login here</a></p>
</body>
</html>
```
注意:这里的代码只是一个示例,实际开发中应该根据需求进行相应的修改和优化。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![](https://img-home.csdnimg.cn/images/20210720083646.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)