Online LearningTutorialsWeb Designing

Learn to create a sign up form in 5 minutes

Let’s build s simple sign up form under 5 minutes!

Create folder and inside this folder create 2 files ‘index.html’ and ‘style.css’

Download any of your desired image and place it inside the folder you just created.

Now Open the ‘index.html’ file and place the following html code inside the file.

<!DOCTYPE html>
<html lang="">

    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="">
    <!-- Custom CSS -->
    <link rel="stylesheet" href="style.css">

    <title>Sign up  Form | Prolonged Worker</title>

    <!-- Form Code Here -->


Now we will add the div and some markup inside the body

 <div class="container">
        <div class="row">
            <div class="col-md-4 col-10 mx-auto form-box">
                <div class="text-center">
                <!--Form starts-->
                <!--Form Ends-->

Now we will add the form element just after the comment <!–Form starts–> in “index.html’

<form action="" class="">
                    <div class="form-group">
                        <label for="uname">Email:</label>
                        <input type="text" class="form-control" id="uname" placeholder="Enter username" name="uname" required>
                    <div class="form-group">
                        <label for="pwd">Password:</label>
                        <input type="password" class="form-control" id="pwd" placeholder="Enter password" name="pswd" required>
                    <div class="form-group">
                        <label for="pwd">Confirm Password:</label>
                        <input type="password" class="form-control" id="confirm-pwd" placeholder="Confirm password" name="confirm-pswd" required>
                    <div class="form-group form-check">
                        <label class="form-check-label">
                            <input class="form-check-input" type="checkbox" name="remember" required> Remember Me
                    <div class="text-center">
                        <button type="submit" class="btn btn-custom">Login</button>

Congrats! You have completed the html part of the code.

Now it’s time to add some style to the page. Open “style.css” file and we will write the css code.

First of all we will set the background of the body and set the screen height to 100%;

    background: url('bg.jpg');
    background-size: cover;
    padding-top: 20vh;

Now let’s add the white background for form area.

    background-color: rgba(255,255,255,0.7);
    padding:30px 20px;
    border-radius: 10px;

Button on the form should also be unique. Let’s style it:

    background-color: chocolate;
    border-radius: 20px;

As, we are desinging the responsive form which should look better too on small devices like mobile screens.

Let’s add the css style for small screen:

@media only screen and (max-width: 600px) {

Congratulations! You have designed your own signup form!

I will be sharing more tutorials for web design! Stay in touch!


Awais Ahmad

I am a Digital evangelist and have been working with different web technologies and Digital Marketing scenarios.

Related Articles

Leave a Reply

Back to top button

Adblock Detected

Please whitelist our site from the adblocker to read the content.