Post Ticker

6/recent/ticker-posts

How to Make A Simple Register Form With HTML & CSS (Project-01)

 Today I will discuss how to make a registration form. It is an important thing in our daily life. We will fill up many registration forms in many cases. There are many types of this form but today I discuss only the web registration forms which are made by HTML and CSS. So, let's
start-


At first, make a project folder. I named it Project-01. We need two files here one is index.html and another is stylesheet.css. like the picture: 


Copy the code which is blowing. and past it on index.html :

<!DOCTYPE html>
<html>

    <head>
        <title>A Simple Login Form</title>
    </head>

    <body>
        <div class="fromheader same-style">Register</div>
        <div class="formbody">
        <form>
            
            <!--Name (First Name and Last Name) Fild-->
            <label class="mylable" for="f_name">First Name</label><label style="margin-left: 200px;" class="mylable" for="Enter Your Last Name">Last Name</label><br>
            <input style="width: 45%" placeholder="Enter Your First Name" type="text" name="f_name" class="myfrom" required>
            <input style="margin-left: 20px; width: 45%"  placeholder="Enter Your last Name" type="text" name="l_name" class="myfrom" required><br><br>
            
            <!--E-Mail Fild-->
            <label class="mylable" for="e-mail">E-Mail Address</label><br>
            <input style="width: 95.5%" placeholder="Enter Email exampale:(exampale@exampale.com)" type="text" name="e-mail" class="myfrom" required><br><br>
            
            <!--Gender and birth day Fild-->
            <label class="mylable" for="gender">Select Your Gender</label>
            <label style="margin-left: 130px;" class="mylable" for="birth_day">Date of Birth</label><br>
            <input type="radio" id="mal" name="gender" value="Mal" required>
            <label for="mal">Mal</label>
            <input type="radio" id="femal" name="gender" value="Femal">
            <label for="femal">Femal</label>
            <input type="radio" id="other" name="gender" value="Other">
            <label for="other">Other</label>
            <input style="margin-left: 115px; margin-top: 5px;" type="date" name="birth_day" data-date-inline-picker="true" /><br><br>
            
            <!--Religion Fild-->
            <label class="mylable" for="religion">Religion</label>
            <select style="padding:2px; margin-left: 25px; width: 77%" id="religion" name="religion" required>
              <option value="" selected="selected" disabled="disabled">-- select one --</option>
              <option value="African Traditional &amp; Diasporic">African Traditional &amp; Diasporic</option>
              <option value="Agnostic">Agnostic</option>
              <option value="Atheist">Atheist</option>
              <option value="Baha'i">Baha'i</option>
              <option value="Buddhism">Buddhism</option>
              <option value="Cao Dai">Cao Dai</option>
              <option value="Chinese traditional religion">Chinese traditional religion</option>
              <option value="Christianity">Christianity</option>
              <option value="Hinduism">Hinduism</option>
              <option value="Islam">Islam</option>
              <option value="Jainism">Jainism</option>
              <option value="Juche">Juche</option>
              <option value="Judaism">Judaism</option>
              <option value="Neo-Paganism">Neo-Paganism</option>
              <option value="Nonreligious">Nonreligious</option>
              <option value="Rastafarianism">Rastafarianism</option>
              <option value="Secular">Secular</option>
              <option value="Shinto">Shinto</option>
              <option value="Sikhism">Sikhism</option>
              <option value="Spiritism">Spiritism</option>
              <option value="Tenrikyo">Tenrikyo</option>
              <option value="Unitarian-Universalism">Unitarian-Universalism</option>
              <option value="Zoroastrianism">Zoroastrianism</option>
              <option value="primal-indigenous">primal-indigenous</option>
              <option value="Other">Other</option>
            </select><br><br>
            <!--End Religion Fild-->

            <!--Address Fild-->
            <label class="mylable" for="f_name">Address</label>
            <textarea class="my-textra" placeholder="Enter Your Address" name="address" required></textarea><br><br>

            <!--About User Fild-->
            <label class="mylable" for="f_name">About You</label>
            <textarea class="my-textra" placeholder="Write Something About You" name="about_user" required></textarea>
            <br><br><center><input type="submit" name="submit" class="submit"></center>
        </form>
        </div>
        <div class="fromfooter same-style">Already a member? <a class="link" href="#">Sing Up</a><br> By creating an account you agree to our <a href="#" class="link">Terms & Privacy</div>
    </body>
</html>

Now we can see a rendom form. like it:

Now we should add a css file which name is stylesheet.css. The css code is blow:

body{background-coloraqua;}

div.fromheader{
    background-colorrgb(184250250);
    colorrgb(1059797);
    border-radius8px 8px 0px 0px;
    padding20px;
    text-aligncenter;
    margin-top20px;
    font-size30px;
    margin-left25%;
    margin-right25%;
}

div.fromfooter{
    background-colorrgb(184250250);
    colorrgb(1059797);
    border-radius0px 0px 8px 8px;
    padding20px;
    text-aligncenter;
    font-size15px;
    margin-bottom20px;
    margin-left25%;
    margin-right25%;
}

div.formbody{
    padding20px;
    background-colorazure;
    margin-left25%;
    margin-right25%;
}

input.myfrom{
    padding8px;
    border1px solid gray;
    border-radius4px;
    margin-right8px;
}

label.mylablefont-size22px;}

input.submit{
    font-size22px;
    background-colorgreen;
    colorwhite;
    border-radius8px;
    padding10px;
}

a.link{colorrgb(313030);}
a.link:hover{colorrgb(20204112);}

textarea.my-textra{
    height:100px
    width95%
    border-radius4px
    padding5px;
}

And add a line ih HTML to connect css into html file on the <head> tag.

<link rel="stylesheet" href="stylesheet.css">

After adding CSS and CSS link on HTML we can see a wonderful registration form. 

Download Scour Code

Post a Comment

0 Comments