adc

clicks

How To Create Login Form In HTML and CSS | Make Login Form Design

 Follow the steps to create a responsive Login form using CSS. Add an image inside a container and add inputs with matching labels for each field. Wrap a “form” element around them to process the input. Add the required CSS to design the login page try to keep the design as simple as possible

 

 
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.

<!DOCTYPE html>

<html>

<head>

               <title>Login Form Design</title>

               <link rel="stylesheet" type="text/css" href="style.css">

</head>

<body>

               <div class="login-box">

                              <img src="avatar.png" class="avatar">

                              <h1>Login Here</h1>

                              <form>

                                             <p>Username</p>

                                             <input type="text" name="username" placeholder=" Enter Username">

                                             <p>Password</p>

                                             <input type="text" name="Password" placeholder=" Enter Password">

                                             <input type="submit" name="submit" value="login">

                                             <a href="#">Forget Password</a>

                              </form>

               </div>

</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.

body{

               margin: 0;

               padding: 0;

               background: url(image.jpg);

               background-size: cover;

               background-repeat: no-repeat;

               background-position: cover;

               font-family: sans-serif;

 

}

.login-box{

               width: 320px;

               height: 420px;

               background:rgba(0,0,0,0.5);

               color: #fff;

               top: 50%;

               left: 50%;

               position: absolute;

               transform: translate(-50%, -50%);

               box-sizing: border-box;

               padding: 70px 30px;

}

.avatar{

    width: 100px;

    height: 100px;

    border-radius: 50%;

    position: absolute;

    top: -50px;

    left: calc(50% - 50px);

}

h1{

               margin: 0;

               padding: 0 0 20px;

               text-align: center;

               font-size: 22px;

}

p{

               margin: 0;

               padding: 0;

               font-width:bold;

}

input{

               width: 100%;

               margin-bottom: 20px;

}

input[type="text"], input[type="Password"]{

               border:none;

               border-bottom: 1px solid #fff;

               background:transparent;

               outline: none;

               height: 40px;

               color: #fff;

               font-size: 16px;

}

input[type="submit"]{

               border:none;

               outline: none;

               height: 40px;

               background:#1c8adb;

               color: #fff;

               font-size: 18px;

               border-radius: 20px;

}

a{

               text-decoration: none;

               font-size: 16px;

               color: #fff;

}

 

a:hover{

               color: #39dc79;

}



Source Code / File 

 

Watch Videos 

 

Youtube Channel




How To Create Login Form In HTML and CSS | Make Login Form Design How To Create Login Form In HTML and CSS | Make Login Form Design Reviewed by easycoding on August 21, 2020 Rating: 5

No comments:

Powered by Blogger.