Form tag


Published on

A description about the form tag in HTML is given with full view and cross platform compatibility.

  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Form tag

  1. 1. Prepared By Gusani Mayank
  2. 2. HTML 4.01 Form Tag Reference
  3. 3. HTML <form> Tag <ul><li>The <form> tag is used to create an HTML form for user input. </li></ul><ul><li>A form can contain input elements like text fields, checkboxes, radio-buttons, submit buttons and more. A form can also contain select menus, textarea, fieldset, legend, and label elements. </li></ul><ul><li>Forms are used to pass data to a server. </li></ul>
  4. 4. Required & Optional Attributes
  5. 5. Standard Attributes
  6. 6. HTML <input> Tag <ul><li>The <input> tag is used to select user information. </li></ul><ul><li>An input field can vary in many ways, depending on the type attribute. An input field can be a text field, a checkbox, a password field, a radio button, a button, and more. </li></ul><ul><li>Use the <label> tag to define labels for input elements. </li></ul>
  7. 7. Optional Attributes
  8. 8. Standard Attributes
  9. 9. HTML <textarea> Tag <ul><li>The <textarea> tag defines a multi-line text input control. </li></ul><ul><li>A text area can hold an unlimited number of characters, and the text renders in a fixed-width font (usually Courier). </li></ul><ul><li>The size of a textarea can be specified by the cols and rows attributes, or even better; through CSS' height and width properties. </li></ul>
  10. 10. Required & Optional Attributes
  11. 11. Standard Attributes
  12. 12. HTML <button> Tag <ul><li>The <button> tag defines a push button. </li></ul><ul><li>Inside a button element you can put content, like text or images. This is the difference between this element and buttons created with the input element. </li></ul><ul><li>Always specify the type attribute for the button. The default type for Internet Explorer is &quot;button&quot;, while in other browsers (and in the W3C specification) it is &quot;submit&quot;. </li></ul>
  13. 13. Continue .. <ul><li>The <button> tag is supported in all major browsers. </li></ul><ul><li>If you use the button element in an HTML form, different browsers will submit different values. Internet Explorer will submit the text between the <button> and </button> tags, while other browsers will submit the content of the value attribute. </li></ul><ul><li>Use the input element to create buttons in an HTML form. </li></ul>
  14. 14. Optional & Standard Attributes
  15. 15. HTML <select> Tag <ul><li>The <select> tag is used to create a select list (drop-down list). </li></ul><ul><li>The <option> tags inside the select element define the available options in the list. </li></ul>
  16. 16. Optional & Standard Attributes
  17. 17. HTML <option> Tag <ul><li>The <option> tag defines an option in a select list. </li></ul><ul><li>The option element goes inside the select element. </li></ul><ul><li>If you have a long list of options, you can group together related options with the <optgroup> tag. </li></ul>
  18. 18. Optional & Standard Attributes
  19. 19. HTML <optgroup> Tag <ul><li>The <optgroup> tag is used to group together related options in a select list. </li></ul><ul><li>If you have a long list of options, groups of related options are easier to handle for the user. </li></ul>
  20. 20. Attributes
  21. 21. HTML <label> Tag <ul><li>The <label> tag defines a label for an input element. </li></ul><ul><li>The label element does not render as anything special for the user. However, it provides a usability improvement for mouse users, because if the user clicks on the text within the label element, it toggles the control. </li></ul><ul><li>The for attribute of the <label> tag should be equal to the id attribute of the related element to bind them together. </li></ul>
  22. 22. Optional & Standard Attributes
  23. 23. HTML <fieldset> Tag <ul><li>The <fieldset> tag is used to logically group together elements in a form. </li></ul><ul><li>The <fieldset> tag draws a box around the related form elements. </li></ul><ul><li>The <legend> tag defines a caption for the fieldset element. </li></ul>
  24. 24. Standard Attributes
  25. 25. HTML <legend> Tag <ul><li>The <legend> tag defines a caption for the fieldset element. </li></ul>
  26. 26. Optional & Standard Attributes
  27. 27. End Of HTML Tour