HTML
HTML
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Login Form in HTML and CSS | CodingNepal</title>
<link rel="stylesheet" href="style.css" />
</head>
<body>
<div class="login_form">
<!-- Login form container -->
<form action="#">
<h3>Log in with</h3>
<div class="login_option">
<!-- Google button -->
<div class="option">
<a href="#">
<span>Google</span>
</a>
</div>
@import url('https://fonts.googleapis.com/css2?
family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');
*{
margin: 0;
padding: 0;
box-sizing: border-box;
body {
width: 100%;
min-height: 100vh;
padding: 0 10px;
display: flex;
background: #626cd6;
justify-content: center;
align-items: center;
.login_form {
width: 100%;
max-width: 435px;
background: #fff;
border-radius: 6px;
.login_form h3 {
font-size: 20px;
text-align: center;
}
.login_form .login_option {
display: flex;
width: 100%;
justify-content: space-between;
align-items: center;
height: 56px;
display: flex;
justify-content: center;
align-items: center;
gap: 12px;
background: #F8F8FB;
border-radius: 5px;
text-decoration: none;
color: #171645;
font-weight: 500;
background: #ededf5;
border-color: #626cd6;
.login_form p {
text-align: center;
font-weight: 500;
.login_form .separator {
position: relative;
margin-bottom: 24px;
background: #fff;
z-index: 1;
padding: 0 10px;
position: relative;
.login_form .separator::after {
content: '';
position: absolute;
width: 100%;
top: 50%;
left: 0;
height: 1px;
background: #C2C2C2;
display: block;
display: block;
font-weight: 500;
margin-bottom: 8px;
width: 100%;
height: 57px;
border-radius: 5px;
outline: none;
background: #F8F8FB;
font-size: 17px;
margin-bottom: 25px;
border-color: #626cd6;
display: flex;
justify-content: space-between;
text-align: center;
form .input_box {
position: relative;
a{
text-decoration: none;
color: #626cd6;
font-weight: 500;
}
a:hover {
text-decoration: underline;
form button {
width: 100%;
height: 56px;
border-radius: 5px;
border: none;
outline: none;
background: #626CD6;
color: #fff;
font-size: 18px;
font-weight: 500;
text-transform: uppercase;
cursor: pointer;
margin-bottom: 28px;
form button:hover {
background: #4954d0;