how create html form

html forms are used to collect user information and pass to the server. html form provides gui(graphic user interface)component to users. example:- text field ,radio buttom ,button,checkbox,password field.

html form:

the form is defined by <form> tag.html form has matching end tag </form> <form action="server side action handleable page" method="type of method (get/post)" all of the form element put here </form>

form lable:-

the <label>tag defines textual labels for form has the following format:

                   <form action="url"  method="get">
              <label for="id_of_related_tag">Father_Name:  </label>
              <label for="id_related"> First_Name:   </label>
              </form>    </div> 

above code output-

the text <input> element is for entering one line of format :<input type="text" /> it have not end tag,optional attributes let you set a maximum number of character and the width ,height of this control.input tag is a inline tag.

form text field

   <label>name:-</label> <input type="text" width="140px" height="40px"  size="30">
<label>first-name</label> <input type="text" width="140px" height="40px" size="40"> </form>

look the above code output

form password field:its used set password input type

  <label for="">password:</lable>
  <input type="password"  id="id_value"  name="name_value" width="130px" height="40px;" />

see result

form radio button:

the radio <input type="radio" name="name_of_group" > element creates a single control with several buttons,only one of which can be selected at any time.

              <input type="radio" name="gender" value="female"/>
              <input type="radio" name="gender" value="male"/>

look the above code output


check Boxes:-

a checkbox<input type="checkbox" id="" value=""> element creates a checkbox control that can be either checked or can use multiple checkboxes together.and if you do,you can check as many or few as you like.

 <input type="checkbox" id="id_value" name="name_para" value="facebook"/>google
             <input type="checkbox" name="" id="" value="google" />facebook
             <input type="checkbox" name="" id="" value="ebay" />ebay

look the above code output

google     facebook    ebay

form textarea field:

the <textarea> element creates a multiline text area. textarea has a closing tag <textarea> -------</textarea> textarea tag have two attribute which indicate rows and cols.

   <textarea  rows="20"  cols="20">      default text put here  </textarea>

look the above code output

form tagsdescription
<form>defines an html form
<input>defines an input type (gui)
<label>defines an label
<fieldset>creat groups
<legend>set legend
<select>creat drop-down list
<button>creat dutton gui
<option>define option in drop-down list
<opgroup>define option group in drop-down list