gpt-4o-2024-11-20· OpenAI
WildChat-4.8M (AI2)
Buatkan kode html untuk login page
- User
Buatkan kode html untuk login page
- Assistant
Buatkan kode html untuk login page
Berikut adalah contoh kode HTML sederhana untuk halaman login:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login Page</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f4f4f4;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
}
.login-container {
background: #fff;
padding: 20px 30px;
border-radius: 8px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
width: 100%;
max-width: 400px;
}
.login-container h2 {
text-align: center;
margin-bottom: 20px;
color: #333;
}
label {
display: block;
margin-bottom: 5px;
font-weight: bold;
color: #555;
}
input[type="text"], input[type="password"] {
width: 100%;
padding: 10px;
margin-bottom: 15px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
}
input[type="submit"] {
width: 100%;
padding: 10px;
background-color: #4CAF50;
border: none;
border-radius: 5px;
color: #fff;
font-size: 16px;
cursor: pointer;
}
input[type="submit"]:hover {
background-color: #45a049;
}
.register-link {
text-align: center;
margin-top: 15px;
font-size: 14px;
}
.register-link a {
color: #4CAF50;
text-decoration: none;
}
.register-link a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="login-container">
<h2>Login</h2>
<form action="login_process.php" method="POST">
<label for="username">Username</label>
<input type="text" id="username" name="username" placeholder="Enter your username" required>
<label for="password">Password</label>
<input type="password" id="password" name="password" placeholder="Enter your password" required>
<input type="submit" value="Login">
</form>
<div class="register-link">
<p>Don't have an account? <a href="register.html">Register here</a></p>
</div>
</div>
</body>
</html>
<form>, <input>, dan <label>.<style> agar lebih menarik.max-width di dalam .login-container.login_process.php untuk diproses. Anda dapat mengganti URL ini dengan script backend milik Anda.Anda dapat menyesuaikan desain atau fungsionalitas sesuai kebutuhan. Semoga bermanfaat! 😊
Not yet included in a published release.