How to create a Registration Form using Only HTML and CSS



We will using only HTML and CSS these two we will make it fun. Using these two I gonna make a attractive Registration Form. "How to create a  Registration Form using Only HTML and CSS". Registration Form Using Only HTML and CSS With Source Code Available. Try These  Registration Form to Make a  Registration Form and Attract customers. So here is the code and my work. Hope you are gonna love this and share with your friends too.

Video Tutorial

Step 1) Open a any code Editor in any Devices

Step 2) Create a file and save it index.html with .html extension

Step 3) Paste these code on index.html file and save it (ctrl+s) 

Add this Code in index.html Page

 <!DOCTYPE html>  
 <html>  
 <head>  
      <meta charset="utf-8">  
      <title>Full Responsive Registration Form in HTML and CSS</title>  
      <meta name="viewport" content="width=device-width, initial-scale=1.0">  
      <!--Font Awesome CDN-->  
      <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.3/css/all.min.css" crossorigin="anonymous">  
      <!--Custome CSS Link-->  
      <link rel="stylesheet" type="text/css" href="css/style.css">  
 </head>  
 <body>  
 <div class="container">  
      <h2>Registration Form</h2>  
      <form>  
           <div class="box">  
                <span><i class="fa fa-user"></i></span>  
                <input type="text" placeholder="Full Name" class="input-data">  
           </div>  
           <div class="box">  
                <span><i class="fa fa-envelope"></i></span>  
                <input type="text" placeholder="Email" class="input-data">  
           </div>  
           <div class="box">  
                <span><i class="fa fa-lock"></i></span>  
                <input type="text" placeholder="Password" class="input-data">  
           </div>  
           <div class="box">  
                <span><i class="fa fa-lock"></i></span>  
                <input type="text" placeholder="Re-type Password" class="input-data">  
           </div>  
           <div class="space">  
                <input type="radio" name="gender">&nbsp;  
                <label>Male</label>  
                <input type="radio" name="gender">&nbsp;  
                <label>Female</label>  
           </div>  
           <div class="box">  
                <select class="select-data">  
                     <option>Select a state</option>  
                </select>  
           </div>  
           <div class="space">  
                <input type="checkbox">&nbsp;  
                <label>I agree with terms and conditions.</label>  
           </div>  
           <div class="space">  
                <input type="submit" name="submit" class="btn" value="Register">  
           </div>  
      </form>  
 </div>  
 </body>  
 </html>  
*<link rel="stylesheet" type="text/css" href="css/style.css">  This Code be must be added without these code stylesheet code not run.

Step 4) Again create a file name it style.css with .css extension

Step 5) Paste These Code on style.css Page and save it.

Add this Code in style.css Page
 @import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300&display=swap');  
 *{  
      padding: 0;  
      margin: 0;  
      box-sizing: border-box;  
      font-family: 'Poppins', sans-serif;  
 }  
 body{  
      width: 100%;  
      min-height: 100vh;  
      background: #f2f2f2;  
      display: flex;  
      justify-content: center;  
      align-items: center;  
 }  
 .container{  
      max-width: 400px;  
      width: 100%;  
      box-shadow: 0px 0px 2px #E8E8E8;  
      background: #fff;  
      position: relative;  
 }  
 .container::before{  
      content: "";  
      width: 100%;  
      height: 8px;  
      position: absolute;  
      top: -1px;  
      border-top-left-radius: 3px;  
      border-top-right-radius: 3px;  
      background: #009688;  
 }  
 .container h2{  
      text-align: center;  
      margin-top: 20px;  
 }  
 .container form{  
      width: 100%;  
      padding: 20px 50px;  
 }  
 .container form .box{  
      width: 100%;  
      height: 40px;  
      position: relative;  
      border: 1px solid #DFDFDF;  
      margin: 10px 0px;  
 }  
 .box .input-data,  
 .box .select-data{  
      position: absolute;  
      top: 0;  
      width: 90%;  
      outline: none;  
      border: 1px solid #DFDFDF;  
      height: 100%;  
      right: 0;  
      padding-left: 5px;  
 }  
 .box .select-data{  
      width: 100%;  
 }  
 .box span{  
      position: absolute;  
   top: -1px;  
   left: 0%;  
   font-size: 1.2em;  
   padding: 5px;  
 }  
 .space{  
      margin-top: 15px;  
 }  
 .btn{  
      width: 100%;  
      text-align: center;  
      padding: 10px;  
      outline: none;  
      cursor: pointer;  
      background: #009688;  
      color: #fff;  
      font-size: 1em;  
      border: none;  
 }  
 @media (max-width: 424px) {  
      .container form{  
           padding: 20px;  
      }  
 }  

Step 6) You are done.....😎

Post a Comment

0 Comments