Close Menu
    Facebook X (Twitter) Instagram
    LudiflexLudiflex
    • Home
    • Blog
    • HTML & CSS
      • Card Design
      • Login Forms
      • Navigation Bar
      • Website Designs
    • JavaScript
      • JavaScript Projects
    • Bootstrap
    • PHP
    LudiflexLudiflex
    Home » Blog » Modern Login form made using HTML and CSS
    HTML & CSS

    Modern Login form made using HTML and CSS

    Learn How to make modern login form with only html and css.
    LudiflexBy LudiflexJuly 19, 2023Updated:November 24, 20231 Comment3 Mins Read

    In the ever-changing world of web design, creating a good-looking and easy-to-use login form is important for websites and apps. This tutorial will show you how to make a modern login form using only HTML and CSS. By the end of this tutorial, you’ll have the skills to design a login form that looks great and works well on your website or app.

    Login forms are used in most of website and Application. The login form helps the user to get access to website or web application they are browsing. (To access their data). So a login form should be well designed.

    Steps:

    1. Setting Up the Project:
      • Learn how to set up your project and create the first HTML file for your login form.
    2. Creating the HTML Structure:
      • Build the basic HTML structure for the login form, including fields and buttons.
    3. Styling with CSS:
      • Dive into using CSS to style your form, covering layout, fonts, colors, and design principles.
    4. Designing User-Friendly Elements:
      • Explore making your form user-friendly with labels, placeholders, and validation.
    5. Responsive Design:
      • Make sure your login form looks and works well on various screen sizes and devices.

    To make this login form we are going to start by. Creating a HTML File and add the following codes.

    HTML Codes

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <link rel="stylesheet" href="style.css">
        <link href='https://unpkg.com/boxicons@2.1.4/css/boxicons.min.css' rel='stylesheet'>
        <title>Ludiflex | Login</title>
    </head>
    <body>
        <div class="box">
            <div class="container">
                <div class="top-header">
                    <span>Have an account?</span>
                    <header>Login</header>
                </div>
    
                <div class="input-field">
                    <input type="text" class="input" placeholder="Username" required>
                    <i class="bx bx-user"></i>
                </div>
                <div class="input-field">
                    <input type="password" class="input" placeholder="Password" required>
                    <i class="bx bx-lock-alt"></i>
                </div>
                <div class="input-field">
                    <input type="submit" class="submit" value="Login">
                </div>
    
                <div class="bottom">
                    <div class="left">
                        <input type="checkbox"  id="check">
                        <label for="check"> Remember Me</label>
                    </div>
                    <div class="right">
                        <label><a href="#">Forgot password?</a></label>
                    </div>
                </div>
            </div>
        </div>
    </body>
    </html>

    CSS Codes

    /* POPPINS FONT */
      @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap');
    *{
        font-family: 'Poppins', sans serif;
    }
    body{
        background-image: url("images/1.jpg");
        background-size: cover;
        background-repeat: no-repeat;
        background-position: center;
        background-attachment: fixed;
    }
    .box{
        display: flex;
        justify-content: center;
        align-items: center;
        min-height: 90vh;
    }
    .container{
        width: 350px;
        display: flex;
        flex-direction: column;
        padding: 0 15px 0 15px;
    }
    span{
        color: #fff;
        font-size: small;
        display: flex;
        justify-content: center;
        padding: 10px 0 10px 0;
    }
    header{
        color: #fff;
        font-size: 30px;
        display: flex;
        justify-content: center;
        padding: 10px 0 10px 0;
    }
    .input-field{
        display: flex;
        flex-direction: column;
    }
    .input-field .input{
        height: 45px;
        width: 87%;
        border: none;
        outline: none;
        border-radius: 30px;
        color: #fff;
        padding: 0 0 0 42px;
        background: rgba(255,255,255,0.1);
    }
    i{
        position: relative;
        top: -31px;
        left: 17px;
        color: #fff;
    }
    ::-webkit-input-placeholder{
        color: #fff;
    }
    .submit{
        border: none;
        border-radius: 30px;
        font-size: 15px;
        height: 45px;
        outline: none;
        width: 100%;
        background: rgba(255,255,255,0.7);
        cursor: pointer;
        transition: .3s;
    }
    .submit:hover{
        box-shadow: 1px 5px 7px 1px rgba(0, 0, 0, 0.2);
    }
    .bottom{
        display: flex;
        flex-direction: row;
        justify-content: space-between;
        font-size: small;
        color: #fff;
        margin-top: 10px;
    }
    .left{
        display: flex;
    }
    label a{
        color: #fff;
        text-decoration: none;
    }

    Think it was understandable. If you have any problem, leave a comment.

    I will be pleased to help.

    css HTML and CSS
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email
    Previous ArticleCreative Login Form with only HTML and CSS
    Next Article Responsive Animated Bootstrap Login Form
    Ludiflex
    • Website

    Related Posts

    HTML & CSS

    Build a Seamless PHP & AJAX Login and Registration System with No Page Reloads!

    February 1, 2025
    HTML & CSS

    How to Build a Modern, Responsive Login & Registration Form with HTML, CSS, and JavaScript (Step-by-Step Guide)

    February 1, 2025
    JavaScript

    How to Create a To-Do List App Using HTML, CSS, and JavaScript

    December 16, 2024
    View 1 Comment

    1 Comment

    1. Oscar on August 31, 2023 1:20 am

      Muchas gracias por compartir

      Reply
    Leave A Reply Cancel Reply

    Follow Us
    • YouTube
    • Instagram
    • TikTok
    • Twitter
    Recent Posts

    Build a Seamless PHP & AJAX Login and Registration System with No Page Reloads!

    How to Build a Modern, Responsive Login & Registration Form with HTML, CSS, and JavaScript (Step-by-Step Guide)

    Top 20 Essential Shortcuts for Visual Studio Code You Should Know

    How to Create a To-Do List App Using HTML, CSS, and JavaScript

    Login and Register App using React and OneEntry Headless CMS

    Facebook X (Twitter) Instagram Pinterest
    © 2025 Ludiflex. Made with ♥ by Ludiflex.

    Type above and press Enter to search. Press Esc to cancel.