html5注册网页代码
时间: 2023-07-25 12:33:06 浏览: 62
以下是一个简单的 HTML5 注册页面代码示例:
```
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>注册页面</title>
</head>
<body>
<h1>欢迎注册!</h1>
<form action="/register" 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>
<button type="submit">注册</button>
</form>
</body>
</html>
```
这段代码包含一个 HTML5 表单,其中包含用户名、电子邮件、密码和确认密码字段。当用户提交注册表单时,表单数据将发送到 `/register` 路径。