Login Page in HTML with CSS code | Login Page in HTML
SOURCE CODE:
HTML CODE:
Step1- Copy and paste the HTML code mentioned below and save the file as "login.html".
<!-- Coding by CodingLab | www.codinglabweb.com-->
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!--<title> Registration or Sign Up form in HTML CSS | CodingLab </title>-->
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="wrapper">
<h2>Registration</h2>
<form action="#">
<div class="input-box">
<input type="text" placeholder="Enter your name" required>
</div>
<div class="input-box">
<input type="text" placeholder="Enter your email" required>
</div>
<div class="input-box">
<input type="password" placeholder="Create password" required>
</div>
<div class="input-box">
<input type="password" placeholder="Confirm password" required>
</div>
<div class="policy">
<input type="checkbox">
<h3>I accept all terms & condition</h3>
</div>
<div class="input-box button">
<input type="Submit" value="Register Now">
</div>
<div class="vl">
<h3 class="vl-innertext">OR</h3>
</div>
<div class="col">
<a href="#" class="fb btn">
<i class="fa fa-facebook fa-fw"></i> Login with Facebook
</a>
<a href="#" class="twitter btn">
<i class="fa fa-twitter fa-fw"></i> Login with Twitter
</a>
<a href="#" class="google btn"><i class="fa fa-google fa-fw">
</i> Login with Google+
</a>
</div>
<div class="text">
<h3>Already have an account? <a href="#">Login now</a></h3>
</div>
</form>
</div>
</body>
</html>
-------------------------------------------------------------------------------------------------
CSS CODE :
Step2- Copy and paste the CSS code below and save the file as "style.css".
@import url('https://fonts.googleapis.
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
}
body{
min-height: 100vh;
display: flex;
align-items: center;
justify-content: center;
background-image:
conic-gradient(#fff, #000, #505761,#244a80,#051730,#
}
.wrapper{
position: relative;
max-width: 500px;
width: 100%;
background: #fff;
padding: 34px;
border-radius: 6px;
box-shadow: 0 8px 15px rgba(0,0,0,0.5);
}
.wrapper h2{
position: relative;
font-size: 22px;
font-weight: 600;
color: #333;
}
.wrapper h2::before{
content: '';
position: absolute;
left: 0;
bottom: 0;
height: 3px;
width: 28px;
border-radius: 12px;
background: #4070f4;
}
.wrapper form{
margin-top: 30px;
}
.wrapper form .input-box{
height: 52px;
margin: 18px 0;
}
form .input-box input{
height: 100%;
width: 100%;
outline: none;
padding: 0 15px;
font-size: 17px;
font-weight: 400;
color: #333;
border: 1.5px solid #C7BEBE;
border-bottom-width: 2.5px;
border-radius: 6px;
transition: all 0.3s ease;
}
.input-box input:focus,
.input-box input:valid{
border-color: #4070f4;
}
form .policy{
display: flex;
align-items: center;
}
form h3{
color: #707070;
font-size: 14px;
font-weight: 500;
margin-left: 10px;
}
.input-box.button input{
color: #fff;
letter-spacing: 1px;
border: none;
background: #4070f4;
cursor: pointer;
}
.input-box.button input:hover{
background: #0e4bf1;
}
form .text h3{
color: #333;
width: 100%;
text-align: center;
}
form .text h3 a{
color: #4070f4;
text-decoration: none;
}
form .text h3 a:hover{
text-decoration: underline;
}
input:hover,
.btn:hover {
opacity: 1;
}
/* add appropriate colors to fb, twitter and google buttons */
.fb {
background-color: #3B5998;
color: white;
}
.twitter {
background-color: #55ACEE;
color: white;
}
.google {
background-color: #dd4b39;
color: white;
}
.col {
width: 100%;
margin-top: 50px;
}
.btn {
width: 100%;
padding: 12px;
border: none;
border-radius: 4px;
margin: 5px 0;
opacity: 0.85;
display: inline-block;
font-size: 17px;
line-height: 20px;
text-decoration: none; /* remove underline from anchors */
}
.btn:hover {
opacity: 1;
}
/* vertical line */
.vl {
position: absolute;
left: 45%;
border: 2px solid #ddd;
bottom: 35%;
}
.vl-innertext {
position: absolute;
background-color: #f1f1f1;
border: 1px solid #ccc;
border-radius: 50%;
padding: 8px 10px;
box-shadow: 0.2, 0.5 whitesmoke ;
}
---------------------------------------------------------------------
How to run the source code :-
Step1- Copy and paste the HTML code mentioned below and save the file as "login.html".
Step2- Copy and paste the CSS code below and save the file as "style.css".
Step4- Run "login.html" file.
0 Comments