html写登录注册界面
时间: 2023-10-26 15:18:26 浏览: 31
以下是一个简单的登录注册界面的HTML代码示例:
```
<!DOCTYPE html>
<html>
<head>
<title>登录注册</title>
<meta charset="utf-8">
</head>
<body>
<h1>欢迎使用我们的网站</h1>
<h2>登录</h2>
<form>
<label for="username">用户名:</label>
<input type="text" id="username" name="username"><br><br>
<label for="password">密码:</label>
<input type="password" id="password" name="password"><br><br>
<input type="submit" value="登录">
</form>
<h2>注册</h2>
<form>
<label for="new_username">用户名:</label>
<input type="text" id="new_username" name="new_username"><br><br>
<label for="new_password">密码:</label>
<input type="password" id="new_password" name="new_password"><br><br>
<label for="confirm_password">确认密码:</label>
<input type="password" id="confirm_password" name="confirm_password"><br><br>
<input type="submit" value="注册">
</form>
</body>
</html>
```
在这个示例中,我们使用了`<form>`标签创建表单,其中包含了输入框和一个提交按钮。每个输入框都有一个对应的标签(`<label>`)来描述它们的用途,并使用`id`属性指定它们的唯一标识符。`name`属性指定了表单数据的名称,以便在提交表单时处理数据。
相关推荐
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.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)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)