What are Forms

Have you ever filled a physical form before?
In that form you entered your name, address, and other fields before submitting it to the person incharge.
Think of HTML forms in the same way
An HTML form is used to collect user input. The user input is most often sent to a server for processing.


Form input Type  & Description

Sr. NO Value Description
1 Displays a single-line text input field.
2 Displays a radio button (for selecting one of many choices).
3 Displays a checkbox (for selecting zero or more of many choices).
4 Displays a submit button (for submitting the form). Defines a button for submitting form data to a form-handler. The form-handler is typically a server page with a script for processing input data. The form-handler is specified in the form’s action attribute:
5 Displays a clickable button.
6 Defines a field for an e-mail address. The input value is automatically validated to ensure it is a properly formatted e-mail address
7 Defines a password field.
8 Used for input fields that should contain a date. Depending on browser support, a date picker can show up in the input field.
9 Specifies a date and time input field, with no time zone. Depending on browser support, a date picker can show up in the input field.
10 The required attribute is a boolean attribute. When present, it specifies that an input field must be filled out before submitting the form. Note: The required attribute works with the following input types: text, search, url, tel, email, password, date pickers, number, checkbox, radio, and file.

Exercise 6.1

In the editor below is an example of a form 

Exercise 6.2

Create a Basic Survey form with
The user will need to input the following details
name, address, phone number, email-id, and why the user wants to learn coding.