HTML/CSS:
create a Sign Up and Log In page using HTML and CSS:
HTML CODE: Sign Up code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sign Up</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(to right, #ffd6e7, #c0c0fc);
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
max-width: 400px;
width: 100%;
}
h2 {
margin-bottom: 20px;
color: #333;
text-align: center;
}
.form-group {
margin-bottom: 15px;
display: flex;
justify-content: center;
}
.form-group label {
display: block;
margin-bottom: 5px;
color: #555;
}
.form-group input {
width: 80%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
.btn {
width: 100%;
padding: 10px;
background-color: #6a0dad;
border: none;
border-radius: 4px;
color: white;
font-size: 16px;
cursor: pointer;
}
.btn:hover {
background-color: #520a8a;
}
.login-link {
text-align: center;
margin-top: 10px;
}
.login-link a {
color: #6a0dad;
text-decoration: none;
}
.login-link a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h2>Create your account</h2>
<p style="text-align: center; color: #555;">Fill in the details below</p>
<form>
<div class="form-group">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="email">Email:</label>
<input type="email" id="email" name="email" required>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<div class="form-group">
<label for="confirm-password">Confirm Password:</label>
<input type="password" id="confirm-password" name="confirm-password" required>
</div>
<button type="submit" class="btn">Sign Up</button>
</form>
<div class="login-link">
<p>Already have an account? <a href="login.html">Login</a></p>
</div>
</div>
</body>
</html>
HTML/ CSS CODE: SIGN IN:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Login</title>
<style>
body {
font-family: Arial, sans-serif;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;
background: linear-gradient(to right, #ffd6e7, #c0c0fc);
}
.container {
background-color: #fff;
padding: 20px;
border-radius: 8px;
box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
max-width: 400px;
width: 100%;
}
h2 {
margin-bottom: 20px;
color: #333;
text-align: center;
}
.form-group {
margin-bottom: 15px;
display: flex;
justify-content: center;
}
.form-group label {
display: block;
margin-bottom: 5px;
color: #555;
}
.form-group input {
width: 80%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 4px;
}
.btn {
width: 100%;
padding: 10px;
background-color: #6a0dad;
border: none;
border-radius: 4px;
color: white;
font-size: 16px;
cursor: pointer;
}
.btn:hover {
background-color: #520a8a;
}
.forgot-password, .signup-link {
text-align: center;
margin-top: 10px;
}
.forgot-password a, .signup-link a {
color: #6a0dad;
text-decoration: none;
}
.forgot-password a:hover, .signup-link a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<div class="container">
<h2>Welcome Back</h2>
<p style="text-align: center; color: #555;">Enter your credentials to login</p>
<form>
<div class="form-group">
<label for="username">Username:</label>
<input type="text" id="username" name="username" required>
</div>
<div class="form-group">
<label for="password">Password:</label>
<input type="password" id="password" name="password" required>
</div>
<button type="submit" class="btn">Login</button>
</form>
<div class="forgot-password">
<a href="#">Forgot password?</a>
</div>
<div class="signup-link">
<p>Don't have an account? <a href="signup.html">Sign Up</a></p>
</div>
</div>
</body>
</html>
0 Comments