Oct 30, 20212 min read

How to create Login Form with HTML and CSS

Create a professional login form with HTML and CSS. Build secure authentication forms with input fields, validation styling, and modern UI design.

How to create Login Form with HTML and CSS

In this article, you will learn how to create Login Form using only HTML & CSS. Earlier in this blog, I have shared a couple of simple Login form, but here in this blog, I am going to create a nice-looking Login Form Page. Apart from this, I have shared many CSS animation examples in my blog. Please make sure to check those as well.

HTML forms are required to collect different kinds of user data inputs, such as contact information like name, email address, phone numbers and credit card information, etc.

.

Forms contain unique factors known as controls like inputbox, checkboxes, radio-buttons, submit buttons, and so on. Customers normally complete a form through enhancing its controls e.g. Entering textual content, choosing gadgets, and so forth. and submitting this form to a web server for further processing.

Input Element

That is the most typically used element inside HTML forms. It allows you to specify diverse types of user enter fields, depending on the type attribute. An input detail can be of kind text area, password area, checkbox, radio button, submit button, reset button, record choose container, as well as several new enter types brought in HTML.I have used input type in this project as a text, password and Submit. The submit button is used to send the form data to a web server.

Source Code:

If you like this login Form, then feel free to use it in your project. First, you have to create two files. One of them is HTML, and the other is CSS. after creating the files, paste the code provided below.

How to create Login Form with HTML and CSS
1<!DOCTYPE html>
2<html lang="en">
3<head>
4 <meta charset="UTF-8">
5 <title>Login Form | By Code Info</title>
6 <link rel="stylesheet" href="style.css">
7</head>
8<body>
9 <div class="container">
10 <div class="login">
11 <form>
12 <h1>Login</h1>
13 <hr>
14 <p>Explore the World!</p>
15 <label>Email</label>
16 <input type="text" placeholder="abc@exampl.com">
17 <label>Password</label>
18 <input type="password" placeholder="enter your password!">
19 <button>Submit</button>
20 <p>
21 <a href="#">Forgot Password?</a>
22 </p>
23 </form>
24 </div>
25 <div class="pic">
26 <img src="/pic/image.jpg">
27 </div>
28 </div>
29
30</body>
31</html>

I hope you liked this snippet. If so, please share the blog and follow us in our social media profiles and stay connected with this blog. Thank you for stopping by.