HTML form is used to take data from the user. Form can be used for many purposes either it is for registration of user, creating a subscription page, etc.
After taking inputs from user, the data is send to server for further processing.
<form> tag is used to define a form. A form contains different elements like textfield, radio buttons, submit button etc.
Form contains different elements some of them are given below:
It is defined using <input> tag. Input tag is used to take input form the user, it can be of many form depending upon its attribute value.
Let's understand it more clearly.
<input> tag has an attribute type, which is used to define the type of input field as text, radio, button, etc.
Let's see more fields that can be used to take inputs.
Text Field are the areas to get text input in one line.
Radio Field are the mostly used to get select one option from different available options.
Password Field is used to get password from the user, it is mainly used for login and registration page. Whenever a user enters a character it gets converted into dot for security reasons.
Checkbox field is used to select more than one option from different given options.
Submit button is used to submit the form to the server (form-handler). Form handler is specified into the action field. Form handler is the page where the data from this page is send to that page and processed for further operations.
Reset button is used to reset the data that is filled up in the form.