adc

clicks

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

 

 


 

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 page</title>

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

            <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">

</head>

<body>

            <div class="container">

                        <div class="header">

                                    <h1>LOGIN</h1>

                        </div>

                        <div class="main">

                                    <form>

                                                <i class="fa fa-user-circle-o"></i>

                                                <input type="text" name="" placeholder="Username"> <br>

                                                <i class='fas fa-lock'></i>

                                                <input type="password" name="" placeholder="Password"> <br>

                                                <button>Login</button>

                                    </form>

                        </div>

                        <div class="footer">

                                    <a href="#">Forgot Your Password</a>

                        </div>

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

            font-family: sans-serif;

            background-color: #BBCCDD;

}

 

.container {

            margin: auto;

            width: 415px;

            box-shadow: 0 0 10px #333;

            background-color: white;

            border-radius: 25px;

}

 

.header {

            height: 200px;

            background-color: #5d9c6d;

            border-radius: 25px 25px 50px 0;

h1 {

            color: white;

            line-height: 200px;

            text-align: center;

            font-size: 37px;

            letter-spacing: 2px;

}

 

.main {

            margin-top: 100px;

            text-align: center;

}

 

input {

            height: 48px;

            width: 285px;

            margin-bottom: 55px;

            margin-left: -35px;

            padding-left: 45px;

            border:none;

            outline: none;

            font-size: 16px;

            border-radius: 25px;

            background-color: #5d9c6d;

            color: white;

            letter-spacing: 1px;

            transition: .3s;

}

input:hover {

            width: 300px;

}

i {

            color: white;

            margin-left: 32px;

            position: relative;

}

 

button {

            width: 125px;

            height: 45px;

            font-size: 16px;

            font-weight: bold;

            letter-spacing: 1px;

            color: white;

            border:none;

            outline: none;

            border-radius: 25px;

            background-color: #5d9c6d;

            transition: .2s;

}

 

button:hover {

            width: 135px;

}

 

.footer{

            margin-top: 50px;

            height: 90px;

            background-color: #5d9c6d;

            border-radius: 50px 0 25px 25px;

}

 

a{

            display: block;

            font-size: 16px;

            color: #eaeaea;

            text-align: center;

            line-height: 90px;

            text-decoration: none;

            transition: .1s;

}

a:hover{

            color: white;

            text-shadow: 0 0 2px #333;

}

 

Source Code




 

 

 

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

No comments:

Powered by Blogger.