Login form with social media button using HTML & CSS

I can provide you with an example of a login form with social media buttons. Keep in mind that this is a basic HTML/CSS structure, and you might need to adapt it to your specific needs and styling preferences. Here's the code:

html
<!DOCTYPE html>
<html>
    <head>
        <title>Login Form</title>
        <style>
            body {
                font-family: Arial, sans-serif;
            }

            .container {
                max-width: 400px;
                margin: 0 auto;
                padding: 20px;
                border: 1px solid #ccc;
                border-radius: 5px;
                box-shadow: 0 0 5px rgba(0, 0, 0, 0.1);
            }

            .form-group {
                margin-bottom: 20px;
            }

            label {
                display: block;
                font-weight: bold;
                margin-bottom: 5px;
            }

            input[type="text"],
            input[type="password"] {
                width: 100%;
                padding: 10px;
                border: 1px solid #ccc;
                border-radius: 5px;
            }

            .btn {
                display: inline-block;
                padding: 10px 20px;
                background-color: #4CAF50;
                color: #fff;
                border: none;
                border-radius: 5px;
                cursor: pointer;
            }

            .btn-facebook {
                background-color: #3b5998;
            }

            .btn-google {
                background-color: #db4a39;
            }

            .btn-login {
                background-color: #4CAF50;
            }

            .btn:hover {
                opacity: 0.8;
            }
        </style>
    </head>
    <body>
        <div class="container">
            <form>
                <div class="form-group">
                    <label for="username">Username:</label>
                    <input type="text" id="username" name="username" placeholder="Enter your username">
                </div>
                <div class="form-group">
                    <label for="password">Password:</label>
                    <input type="password" id="password" name="password" placeholder="Enter your password">
                </div>
                <div class="form-group">
                    <input type="submit" class="btn btn-login" value="Login">
                </div>
                <div class="form-group">
                    <p>Or login with:</p>
                    <button class="btn btn-facebook">Facebook</button>
                    <button class="btn btn-google">Google</button>
                </div>
            </form>
        </div>
    </body>
</html>

This code creates a basic login form with username and password fields. It also includes social media buttons for Facebook and Google login options. You can style the form and buttons further by modifying the CSS according to your requirements.

Note that this code does not include any backend functionality for handling the login process. It only provides the front-end structure of the form.


Output:

img




About the Author



Silan Software is one of the India's leading provider of offline & online training for Java, Python, AI (Machine Learning, Deep Learning), Data Science, Software Development & many more emerging Technologies.

We provide Academic Training || Industrial Training || Corporate Training || Internship || Java || Python || AI using Python || Data Science etc





 PreviousNext