In this tutorial, We are going to learn how to create a Login page. The most common use of a login page is if you want to customize or tailor information to a particular person or group. It also comes in handy when some people need to see a portion of the site and others should not. That’s the most common use
HTML
Before we start writing code first, we need to create a primary structure of the HTML document, so that the browser can understand and start working. The basic HTML structure looks like the following.
After writing the primary structure of the HTML document, you will also write the tags and content you need. After that, you can see the output in your browser. We know that HTML Sudu Mae is used for exposing content in a basic format. To complete our content we need to use CSS, which is an HTML insert and it creates an engaging user interface.
<html>
<head>
<title>Create Login Page</title>
<link rel="stylesheet" type="text/css" href="style.css">
</head>
<body>
<form class="box">
<h1>Login</h1>
<input type="text" name="" placeholder="Username">
<input type="password" name="" placeholder="Password">
<input type="submit" name="" value="Login">
<a href="#">Forgot Password</a>
</form>
</body>
</html>
CSS
Now, we have time to improve the HTML content, for that, we need to add CSS to the HTML file. CSS can be added to HTML documents in a total of three ways, here we are using outside CSS design using CSS will arrive here after typing and see the output in your browser.
margin: 0;
padding: 0;
font-family: loto;
background-image: url(bg.jpg);
background-size:cover;
background-repeat: no-repeat;
}
.box{
height: 400px;
width: 300px;
padding: 40px;
position: absolute;
top: 50%;
left:50%;
transform: translate(-50%, -50%);
background:#1d1d1d;
text-align: center;
border-radius: 10px;
box-shadow: 0px 0px 29px white;
opacity: 0.8
}
h1{
color: white;
text-transform:uppercase;
font-weight: 500;
font-family: lucida Handwritingl
}
.box input[type="text"], .box input[type="password"]{
border:0;
background:white;
display: block;
margin: 40px auto;
text-align: center;
box-shadow: 5px 5px 10px white inset;
padding: 14px 10px;
width: 200px;
outline: none;
color: black(0,0,0);
border-radius: 25px;
transition: 0.3s;
}
.box input[type="text"]:focus,
.box input[type="password"]:focus{
width: 250px;
}
.box input[type="submit"]{
border:0;
background:none;
display: block;
margin: 40px auto;
text-align: center;
border:2px solid white;
padding: 14px 40px;
outline: none;
color: white;
border-radius: 25px;
transition: 0.4s ease;
cursor: pointer;
font-size: 15px;
font-family: sans-serif;
box-shadow: 0px 0px 29px 2px white;
}
.box input[type="submit"]:hover{
background:#2eee71;
color: black;
}
a{
color: white;
text-align: center;
font-size: 14px;
text-decoration: none;
}
No comments: