Header Ads

HTML5-making a registration form

Having a form fill-up page is pretty much necessary for most of the websites out there. A registration form can be made by HTML5 using <form> element. In that case, you have to put this element inside of <fieldset> tag to assemble all of the attributes and input elements inside of a single field. This is Mashhud Hasan and today I'm going to show you the criteria of making a registration form using HTML5.

The code isn't that big but there are some important things to know about it before you make your form for your website. I've putted <form> element inside of a <fieldset>. Then I've used <pre> tag to assemble all of the input types in line. There are specific input types for different input types and you have to mention them inside of a <input type="">(such as,for the input of the birth date,you have to type <input type="datetime-local">). Inside of this element, you can also use placeholder="" to put any text by default on the blank input input spaces. To give any options for any of the questions, you have to use <option> inside of a <select> element. To specify your options, you have to use the <optgroup label=""> element. There's another way to list your options. You can use <input type="radio"> and put the name of the option beside this element.

In the code of the form that I've made, I've used <style> tag inside of <head> to assign some styles(such as font family, font weight,background color etc.) inside of an ID. then I've used <span id=""> element to apply this style on the specific texts.To make a search box, I've settled up the input element as <input type="search"> and putted an appropriate placeholder for it. I've used title="" attribute for all of the input types. By using this, you will see the text inside of this attribute floated after placing your cursor on the specific input bar.

Finally, I've used <button> tag to make those buttons. For submitting your registration form, you need to make a submit button. In that case, I've settled the button element as <button type="submit" value="submit">SUBMIT</button>. For making a reset button, I've settled that same type of element as <button type="reset" value="reset">RESET</button>.

After executing all of the methods that I've explained above, finally the page of the registration form gets developed as like the picture I've posted below.

You can modify your form page by various ways but this is the easiest way to make it and explains about the basic structure of a registration form. Hope this content helps you guys and stay tuned for more informative stuffs.


No comments

Powered by Blogger.