Sunday, July 29, 2012

HTML Forms

You must have come across several forms in your daily life including feedback forms,application forms ,insurance forms and so what is a form?-in simple words,it is a document with blanks for the insertion of details or information.You can include a form in your webpage using HTML Forms.
     A Form consists of various form elements.these form element must be defined between the Form tags(<form></form>).Form elements are defined with the help of Input tag-<input     type=" ELEMENT TYPE " />.The different element types include:
  • Textfield(type="text") is generally used for entering username,phone no,address,suggestions and other such fields.
  • Passwordfield(type="password")  is used to enter a secret word or phrase usually in order to gain admission into a website.The data entered in this field is encrypted and not visible directly to the user.
  • Radiobuttons(type="radio") are used for displaying multiple choices.
  • Select-<select></select> represents a drop down list for the user to select from.
  • Checkbox(type="checkbox") is generally for yes or not type i.e to request a particular detail about the customer or client.for ex:- I have a Android phone
  • Submit(type="submit") is for submitting you form to the server.The form data is processed using a php or asp page,validated and send the data to the server.(we will be dealing with server side scripting languages later.)

Now open notepad,play with the above tags,save it as index.html and open it in your favorite browser.See what happens and stay tuned for next tutorial.If you have any doubts,feel free to comment and i will get back to you with your can Download the source file here and try out our html editor in the sidebar.


Post a Comment