As you know that we are developing frontend things using Html, CSS, and Javascript. Today we have built a beautiful Html registration form in Html, CSS, and Js language.
Html Registration form:
Basically, all the websites use this type of registration form for their businesses. It helps them to identify their audience. For making your business successful you need to understand the interest of people by their age, gender, region, etc. It is possible when people visit the website, create their account, and buy something from the website.

In this HTML registration form, we have used three languages for creating it and making it responsive. This template contains a beautiful background. Then it has a box that contains all these fields for filling all the details.
It has an image on the left side which shows the category of the website. On the right side, it has all the fields for input. At the top, it has the heading “Registration Info”. It has five input fields. The first field is for name, then birthday, then gender, then class, and code. All these fields need to be filled with relevant stuff. At the bottom, it has a button for search. It will search and make your account successful.
You might like it:
How to create an Html registration form?
You need to download an editor that can help you in writing your code. Then create three files for creating this type of registration form.
Source code of Html file:
Html is a markup language used for writing the content and making the skeleton of web pages.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Required meta tags-->
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="Colorlib Templates">
<meta name="author" content="Colorlib">
<meta name="keywords" content="Colorlib Templates">
<!-- Title Page-->
<title>Register Forms by FantacyDesigns</title>
<!-- Icons font CSS-->
<link href="vendor/mdi-font/css/material-design-iconic-font.min.css" rel="stylesheet" media="all">
<link href="vendor/font-awesome-4.7/css/font-awesome.min.css" rel="stylesheet" media="all">
<!-- Font special for pages-->
<link href="https://fonts.googleapis.com/css?family=Roboto:100,100i,300,300i,400,400i,500,500i,700,700i,900,900i" rel="stylesheet">
<!-- Vendor CSS-->
<link href="vendor/select2/select2.min.css" rel="stylesheet" media="all">
<link href="vendor/datepicker/daterangepicker.css" rel="stylesheet" media="all">
<!-- Main CSS-->
<link href="css/main.css" rel="stylesheet" media="all">
</head>
<body>
<div class="page-wrapper bg-red p-t-180 p-b-100 font-robo">
<div class="wrapper wrapper--w960">
<div class="card card-2">
<div class="card-heading"></div>
<div class="card-body">
<h2 class="title">Registration Info</h2>
<form method="POST">
<div class="input-group">
<input class="input--style-2" type="text" placeholder="Name" name="name">
</div>
<div class="row row-space">
<div class="col-2">
<div class="input-group">
<input class="input--style-2 js-datepicker" type="text" placeholder="Birthdate" name="birthday">
<i class="zmdi zmdi-calendar-note input-icon js-btn-calendar"></i>
</div>
</div>
<div class="col-2">
<div class="input-group">
<div class="rs-select2 js-select-simple select--no-search">
<select name="gender">
<option disabled="disabled" selected="selected">Gender</option>
<option>Male</option>
<option>Female</option>
<option>Other</option>
</select>
<div class="select-dropdown"></div>
</div>
</div>
</div>
</div>
<div class="input-group">
<div class="rs-select2 js-select-simple select--no-search">
<select name="class">
<option disabled="disabled" selected="selected">Section</option>
<option>S1</option>
<option>S2</option>
<option>S3</option>
</select>
<div class="select-dropdown"></div>
</div>
</div>
<div class="row row-space">
<div class="col-2">
<div class="input-group">
<input class="input--style-2" type="text" placeholder="Registration Code" name="res_code">
</div>
</div>
</div>
<div class="p-t-30">
<button class="btn btn--radius btn--green" type="submit">Search</button>
</div>
</form>
</div>
</div>
</div>
</div>
<!-- Jquery JS-->
<script src="vendor/jquery/jquery.min.js"></script>
<!-- Vendor JS-->
<script src="vendor/select2/select2.min.js"></script>
<script src="vendor/datepicker/moment.min.js"></script>
<script src="vendor/datepicker/daterangepicker.js"></script>
<!-- Main JS-->
<script src="js/global.js"></script>
</body><!-- This templates was made by FantacyDesigns (https://job.fantacydesigns.com) -->
</html>
<!-- end -->
Source code of CSS file:
Also, link it with an Html file so that CSS can be applied to Html. It helps us in designing different web pages.
/* ==========================================================================
#FONT
========================================================================== */
.font-robo {
font-family: "Roboto", "Arial", "Helvetica Neue", sans-serif;
}
/* ==========================================================================
#GRID
========================================================================== */
.row {
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
-webkit-flex-wrap: wrap;
-ms-flex-wrap: wrap;
flex-wrap: wrap;
}
.row-space {
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-moz-box-pack: justify;
-ms-flex-pack: justify;
justify-content: space-between;
}
.col-2 {
width: -webkit-calc((100% - 60px) / 2);
width: -moz-calc((100% - 60px) / 2);
width: calc((100% - 60px) / 2);
}
@media (max-width: 767px) {
.col-2 {
width: 100%;
}
}
/* ==========================================================================
#BOX-SIZING
========================================================================== */
/**
* More sensible default box-sizing:
* css-tricks.com/inheriting-box-sizing-probably-slightly-better-best-practice
*/
html {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
* {
padding: 0;
margin: 0;
}
*, *:before, *:after {
-webkit-box-sizing: inherit;
-moz-box-sizing: inherit;
box-sizing: inherit;
}
/* ==========================================================================
#RESET
========================================================================== */
/**
* A very simple reset that sits on top of Normalize.css.
*/
body,
h1, h2, h3, h4, h5, h6,
blockquote, p, pre,
dl, dd, ol, ul,
figure,
hr,
fieldset, legend {
margin: 0;
padding: 0;
}
/**
* Remove trailing margins from nested lists.
*/
li > ol,
li > ul {
margin-bottom: 0;
}
/**
* Remove default table spacing.
*/
table {
border-collapse: collapse;
border-spacing: 0;
}
/**
* 1. Reset Chrome and Firefox behaviour which sets a `min-width: min-content;`
* on fieldsets.
*/
fieldset {
min-width: 0;
/* [1] */
border: 0;
}
button {
outline: none;
background: none;
border: none;
}
/* ==========================================================================
#PAGE WRAPPER
========================================================================== */
.page-wrapper {
min-height: 100vh;
}
body {
font-family: "Roboto", "Arial", "Helvetica Neue", sans-serif;
font-weight: 400;
font-size: 14px;
}
h1, h2, h3, h4, h5, h6 {
font-weight: 400;
}
h1 {
font-size: 36px;
}
h2 {
font-size: 30px;
}
h3 {
font-size: 24px;
}
h4 {
font-size: 18px;
}
h5 {
font-size: 15px;
}
h6 {
font-size: 13px;
}
/* ==========================================================================
#BACKGROUND
========================================================================== */
.bg-blue {
background: #2c6ed5;
}
.bg-red {
background: #3F4553;
}
/* ==========================================================================
#SPACING
========================================================================== */
.p-t-100 {
padding-top: 100px;
}
.p-t-180 {
padding-top: 180px;
}
.p-t-20 {
padding-top: 20px;
}
.p-t-30 {
padding-top: 30px;
}
.p-b-100 {
padding-bottom: 100px;
}
/* ==========================================================================
#WRAPPER
========================================================================== */
.wrapper {
margin: 0 auto;
}
.wrapper--w960 {
max-width: 960px;
}
.wrapper--w680 {
max-width: 680px;
}
/* ==========================================================================
#BUTTON
========================================================================== */
.btn {
line-height: 40px;
display: inline-block;
padding: 0 25px;
cursor: pointer;
color: #fff;
font-family: "Roboto", "Arial", "Helvetica Neue", sans-serif;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
font-size: 14px;
font-weight: 700;
}
.btn--radius {
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
}
.btn--green {
background: #262626;
}
.btn--green:hover {
background: #2c6ed5;
}
/* ==========================================================================
#DATE PICKER
========================================================================== */
td.active {
background-color: #2c6ed5;
}
input[type="date" i] {
padding: 14px;
}
.table-condensed td, .table-condensed th {
font-size: 14px;
font-family: "Roboto", "Arial", "Helvetica Neue", sans-serif;
font-weight: 400;
}
.daterangepicker td {
width: 40px;
height: 30px;
}
.daterangepicker {
border: none;
-webkit-box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
display: none;
border: 1px solid #e0e0e0;
margin-top: 5px;
}
.daterangepicker::after, .daterangepicker::before {
display: none;
}
.daterangepicker thead tr th {
padding: 10px 0;
}
.daterangepicker .table-condensed th select {
border: 1px solid #ccc;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
font-size: 14px;
padding: 5px;
outline: none;
}
/* ==========================================================================
#FORM
========================================================================== */
input {
outline: none;
margin: 0;
border: none;
-webkit-box-shadow: none;
-moz-box-shadow: none;
box-shadow: none;
width: 100%;
font-size: 14px;
font-family: inherit;
}
/* input group 1 */
/* end input group 1 */
.input-group {
position: relative;
margin-bottom: 32px;
border-bottom: 1px solid #e5e5e5;
}
.input-icon {
position: absolute;
font-size: 18px;
color: #ccc;
right: 8px;
top: 50%;
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
-ms-transform: translateY(-50%);
-o-transform: translateY(-50%);
transform: translateY(-50%);
cursor: pointer;
}
.input--style-2 {
padding: 9px 0;
color: #666;
font-size: 16px;
font-weight: 500;
}
.input--style-2::-webkit-input-placeholder {
/* WebKit, Blink, Edge */
color: #808080;
}
.input--style-2:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
color: #808080;
opacity: 1;
}
.input--style-2::-moz-placeholder {
/* Mozilla Firefox 19+ */
color: #808080;
opacity: 1;
}
.input--style-2:-ms-input-placeholder {
/* Internet Explorer 10-11 */
color: #808080;
}
.input--style-2:-ms-input-placeholder {
/* Microsoft Edge */
color: #808080;
}
/* ==========================================================================
#SELECT2
========================================================================== */
.select--no-search .select2-search {
display: none !important;
}
.rs-select2 .select2-container {
width: 100% !important;
outline: none;
}
.rs-select2 .select2-container .select2-selection--single {
outline: none;
border: none;
height: 36px;
}
.rs-select2 .select2-container .select2-selection--single .select2-selection__rendered {
line-height: 36px;
padding-left: 0;
color: #808080;
font-size: 16px;
font-family: inherit;
font-weight: 500;
}
.rs-select2 .select2-container .select2-selection--single .select2-selection__arrow {
height: 34px;
right: 4px;
display: -webkit-box;
display: -webkit-flex;
display: -moz-box;
display: -ms-flexbox;
display: flex;
-webkit-box-pack: center;
-webkit-justify-content: center;
-moz-box-pack: center;
-ms-flex-pack: center;
justify-content: center;
-webkit-box-align: center;
-webkit-align-items: center;
-moz-box-align: center;
-ms-flex-align: center;
align-items: center;
}
.rs-select2 .select2-container .select2-selection--single .select2-selection__arrow b {
display: none;
}
.rs-select2 .select2-container .select2-selection--single .select2-selection__arrow:after {
font-family: "Material-Design-Iconic-Font";
content: '\f2f9';
font-size: 18px;
color: #ccc;
-webkit-transition: all 0.4s ease;
-o-transition: all 0.4s ease;
-moz-transition: all 0.4s ease;
transition: all 0.4s ease;
}
.rs-select2 .select2-container.select2-container--open .select2-selection--single .select2-selection__arrow::after {
-webkit-transform: rotate(-180deg);
-moz-transform: rotate(-180deg);
-ms-transform: rotate(-180deg);
-o-transform: rotate(-180deg);
transform: rotate(-180deg);
}
.select2-container--open .select2-dropdown--below {
border: none;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
-webkit-box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
border: 1px solid #e0e0e0;
margin-top: 5px;
overflow: hidden;
}
/* ==========================================================================
#TITLE
========================================================================== */
.title {
text-transform: uppercase;
font-weight: 700;
margin-bottom: 37px;
}
/* ==========================================================================
#CARD
========================================================================== */
.card {
overflow: hidden;
-webkit-border-radius: 3px;
-moz-border-radius: 3px;
border-radius: 3px;
background: #fff;
box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}
.card-2 {
-webkit-box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
-moz-box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
box-shadow: 0px 8px 20px 0px rgba(0, 0, 0, 0.15);
-webkit-border-radius: 10px;
-moz-border-radius: 10px;
border-radius: 10px;
width: 100%;
display: table;
box-shadow: rgba(0, 0, 0, 0.19) 0px 10px 20px, rgba(0, 0, 0, 0.23) 0px 6px 6px;
}
.card-2 .card-heading {
background: url("../images/bg-heading-02.jpg") top left/cover no-repeat;
width: 29.1%;
display: table-cell;
}
.card-2 .card-body {
display: table-cell;
padding: 80px 90px;
padding-bottom: 88px;
}
@media (max-width: 767px) {
.card-2 {
display: block;
}
.card-2 .card-heading {
width: 100%;
display: block;
padding-top: 300px;
background-position: left center;
}
.card-2 .card-body {
display: block;
padding: 60px 50px;
}
}
Source code of javascript:
Once again create a javascript file and save it in the same folder of Html and CSS. Copy this javascript code and paste it into your javascript file.
(function ($) {
'use strict';
/*==================================================================
[ Daterangepicker ]*/
try {
$('.js-datepicker').daterangepicker({
"singleDatePicker": true,
"showDropdowns": true,
"autoUpdateInput": false,
locale: {
format: 'DD/MM/YYYY'
},
});
var myCalendar = $('.js-datepicker');
var isClick = 0;
$(window).on('click',function(){
isClick = 0;
});
$(myCalendar).on('apply.daterangepicker',function(ev, picker){
isClick = 0;
$(this).val(picker.startDate.format('DD/MM/YYYY'));
});
$('.js-btn-calendar').on('click',function(e){
e.stopPropagation();
if(isClick === 1) isClick = 0;
else if(isClick === 0) isClick = 1;
if (isClick === 1) {
myCalendar.focus();
}
});
$(myCalendar).on('click',function(e){
e.stopPropagation();
isClick = 1;
});
$('.daterangepicker').on('click',function(e){
e.stopPropagation();
});
} catch(er) {console.log(er);}
/*[ Select 2 Config ]
===========================================================*/
try {
var selectSimple = $('.js-select-simple');
selectSimple.each(function () {
var that = $(this);
var selectBox = that.find('select');
var selectDropdown = that.find('.select-dropdown');
selectBox.select2({
dropdownParent: selectDropdown
});
});
} catch (err) {
console.log(err);
}
})(jQuery);
Therefore, by using this method you can create an HTML registration form like this. But if you are failed in connecting these files with each other or facing any other then we have great news for you.
You can simply download our created file and you will get all these files in that one file.
Just download it from here and you will get all these files. Just run the file by double-clicking and enjoy your output in your browser.
If this post was helpful for you then don’t forget to like, share and comment.
Thanks for reading this article.