1.HTML forms for collecting different types of user input
2. Text fields: Users can write information in a text field
3. Password field: Create an HTML password field
4. Form: A region that contains form elements
A form is a region that contains form elements.
Form elements are elements that allow users to enter information in a table consignments (such as a text field, drop-down list, radio box, check box, and so on).
The form is defined using the form label (<form>).
<form>, ..... INPUT element ...</form>
5. Enter
In most cases, the form label used is the input label (<input>). The input type is defined by the type attribute. Most of the input types that are often used are as follows:
6. Text field:
A text field is used when a user wants to type something like letters, numbers, and so on in a form.
<input type="text" name="firstname" />
<input type="text" name="lastname" />
</form>
The browser appears as follows:
Notice that the form itself is not visible. Also, in most browsers, the default width of a text field is 20 characters.
7. Radio button
A radio box is used when a user chooses one of several given choices.
<form> <input type="radio" name="sex" value="male" />
male<br/> <input type="radio" name="sex" value="female" />
female</form>
The browser appears as follows:
Note that you can only select one of these.
8. check box
The check box is used when the user needs to select one or several options from several given selections.
<form> <input type="checkbox" name="bike" />
i has a bike<br/> <input type="checkbox" name="car" />
I have a car</form>
The browser appears as follows:
HTML Form November 16, 2015 Learn HTML notes