Build UI & UX Design for Login Form using HTML & CSS

Prince Patel
By -
0

Creating a login form using HTML and CSS is a common task in web development. Below is a simple example of an HTML and CSS login form. You can customize it further to fit your specific design requirements.

HTML
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width,initial-scale=1.0"> <title>Login Form</title> <style> body { font-family: Arial,Helvetica, sans-serif; background-color:#f2f2f2; } .container { width: 300px; margin: 0 auto; margin-top: 100px; background-color: #fff; padding: 20px; border-radius: 5px; box-shadow: 0px 0px 10px 0px #888; } h2 { text-align: center; } input[type="text"], input[type="password"] { width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; box-sizing: border-box; border-radius: 5px; } button { background-color:#1692d4; color: white; padding: 14px 20px; margin: 10px 0; border: none; border-radius: 5px; cursor: pointer; width: 100%; } button:hover { background-color:#02adc6; } .form-group { text-align: center; } .form-group a { text-decoration: none; color: #1692d4; } </style> </head> <body> <div class="container"> <h2>Login</h2> <form action="#" method="post"> <div class="form-group"> <label for="username">Username</label> <input type="text" id="username" name="username" required> </div> <div class="form-group"> <label for="password">Password</label> <input type="password" id="password" name="password" required> </div> <button type="submit">Login</button> </form> <div class="form-group"> <a href="#">Forgot password?</a> </div> </div> </body> </html>

Output:

Post a Comment

0Comments

Post a Comment (0)