好看的登录页面的HTML代码示例
时间: 2023-09-02 14:07:55 浏览: 41
以下是一个简单而好看的登录页面的HTML代码示例:
```html
<!DOCTYPE html>
<html>
<head>
<title>Login Page</title>
<link rel="stylesheet" type="text/css" href="styles.css">
</head>
<body>
<div class="container">
<h2>Login</h2>
<form action="login.php" method="POST">
<div class="input-group">
<label for="username">Username</label>
<input type="text" id="username" name="username" required>
</div>
<div class="input-group">
<label for="password">Password</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit" class="btn">Login</button>
</form>
</div>
</body>
</html>
```
请注意,上面的代码只是一个示例,并未包含完整的样式。这里使用了一个外部样式文件 `styles.css` 来定义页面的样式。你可以根据自己的需求创建一个样式文件,并在 `<link>` 标签中引入它。