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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 |
<!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://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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 |
/* ========================================================================== #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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 |
(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.