Aim: How to create a simple web form
In this lessons, students will apply:
- The different tools for collecting data
- Whenever you want to collect information from visitors you will need a form, which lives in the <form> element.
- Information from a form is sent in name/value pairs.
- Each form control is given a name and the text the user types in or the values of the options they select are sent to the server.
|<label>||Each form control should have it’s own <label> element. This makes the form accessible to vision-impaired users.|
|<fieldset>||This element groups related controls. Most browsers show the fieldset with a line around the edge to show how they are related.|
|<legend>||This element can come directly after the <fieldset> tag and controls the caption, which identifies the purpose of the group of form controls.|
|for||This attribute states which form control, the label belongs to.|