html
<title>登录与注册页面</title>
<!-- 引入CSS样式 -->
<link rel="stylesheet" type="text/css" href="styles.css">
<div class="container">
<h2>登录</h2>
<form action="login_action.php" method="post">
<div class="input-group">
<label for="username">用户名:</label>
<input type="text" id="username" name="username" required>
</div>
<div class="input-group">
<label for="password">密码:</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit">登录</button>
</form>
<h2>注册</h2>
<form action="register_action.php" method="post">
<div class="input-group">
<label for="new_username">用户名:</label>
<input type="text" id="new_username" name="new_username" required>
</div>
<div class="input-group">
<label for="new_password">密码:</label>
<input type="password" id="new_password" name="new_password" required>
</div>
<div class="input-group">
<label for="email">电子邮件:</label>
<input type="email" id="email" name="email" required>
</div>
<button type="submit">注册</button>
</form>
</div>
这个模板包含了登录和注册两个表单,每个表单都有一个用户名输入框、一个密码输入框和一个提交按钮,在实际应用中,你需要将表单的 action 属性设置为处理登录或注册请求的服务器的 URL,你可能还需要添加更多的输入验证和错误处理机制来确保用户输入的数据是有效的,你可能还需要添加一些CSS样式来美化页面。