html
<title>邮箱注册页面</title>
<style>
body {
font-family: Arial, sans-serif;
}
.container {
max-width: 400px;
margin: 0 auto;
padding: 20px;
}
input[type=text], input[type=email], input[type=password] {
width: 100%;
padding: 12px 20px;
margin: 8px 0;
display: inline-block;
border: 1px solid #ccc;
box-sizing: border-box;
}
button {
background-color: #4CAF50;
color: white;
padding: 14px 20px;
margin: 8px 0;
border: none;
cursor: pointer;
width: 100%;
}
button:hover {
background-color: #45a049;
}
</style>
<div class="container">
<h2>邮箱注册</h2>
<form action="/register" method="post">
<div>
<label for="email"><b>邮箱地址</b></label>
<input type="email" id="email" name="email" required>
</div>
<div>
<label for="password"><b>密码</b></label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">注册</button>
</form>
</div>
这个页面包含了一个简单的表单,用户需要输入他们的邮箱地址和密码来注册,表单提交后,数据将被发送到"/register"路径进行进一步处理,表单中的输入字段已经包含了必要的HTML验证(邮箱字段需要输入有效的电子邮件地址,密码字段不能为空),这只是一个前端验证,你还需要在后端进行更严格的验证和数据处理。