HTML FORMS

HTML FORMS

In HTML we make different types of forms by using html5 and css3.

THE <form> Element

The <form> element is used to create a form.
The syntax is.
<form>
   //some code here...
</form>

The <input> Element

The <input> element is used under <form> element.It is used to create textboxes,textarea,checkbox and etc.
The syntax is.
<form>

  <input type = "text" name = "fname">

</form>

In <input> element we have to give a type in which we want to show our <input> element.We have various types of <input> element types.


Input types

   1. <Input type = "text">
  
   In this input type a textfield was created .

   The systex is .... 

   First name: <input type="text" name="fname">

  Output..

  First name :  


 2. <Input type= "Password">

    In this input type a textfield which accepts password was       created .

    The syntax is ...


    Enter password : <Input type= "Password" name ="pwd">

  Output... 

  Enter password :  



3. <Input type = "Submit">
    
    In this input type a submit button was created. 
   
    The syntax is...

   Output...

   <Input type ="Submit" name ="submit">

   

 4.<Input type = "Reset">

   In this input type a reset button was created.

   The syntax is... 

   <Input type ="Reset" name ="Reset">

   Output...

   

 5. <Input type = "tel">

    In this input type a textfeild was created that accepts numbers.
    It does not means that it does not accept alphabet it accepts both number as well as alphabets.
    
    The syntax is...

    <Input type="tel" name="tnumber">

       Output...

    Enter phone number : 

    There are some more input types which are as follows.

  1. <Input type="radio">
  2. <Input type="checkbox">
  3. <Input type="button">
  4. <Input type="color">
  5. <Input type="week">
  6. <Input type="date">
  7. <Input type="datetime-local">
  8. <Input type="email">
  9. <Input type="month">
  10. <Input type="search">
  11. <Input type="number">
  12. <Input type="url">
  13. <Input type="time">
  14. <input type="range">

Comments

Popular posts from this blog