FORM HTML INTRODUCTION

An HTML form is used to collect user input. The user input is most often sent to a server for processing.
 An HTML form is a section of a document that contains controls such as text fields, password fields, checkboxes, radio buttons, submit buttons, menus, etc. 

An HTML form is used to collect user input. The user input is most often sent to a server for processing.  An HTML form is a section of a document that contains controls such as text fields, password fields, checkboxes, radio buttons, submit buttons, menus, etc.   FORM HTML INTRODUCTION     An HTML form facilitates the user to enter data that is to be sent to the server for processing such as name, email address, password, phone number, etc.     Why use HTML Form?   HTML forms are required if you want to collect some data from of the site visitor. For example: If a user wants to purchase some items on the internet, he/she must fill out the form such as shipping address and credit/debit card details so that item can be sent to the given address.  The <form> Element The HTML <form> element is used to create an HTML form for user input:     <form>   <!--form elements--> </form>    The <form> element is a container for different types of input elements, such as: text fields, checkboxes, radio buttons, submit buttons, etc.    Form elements  These are the following HTML <form> elements:    <label>: It defines label for <form> elements.  <input>: It is used to get input data from the form in various types such as text, password, email, etc by changing its type.  <button>: It defines a clickable button to control other elements or execute a functionality.  <select>: It is used to create a drop-down list.  <textarea>: It is used to get input long text content.  <fieldset>: It is used to draw a box around other form elements and group the related data.  <legend>: It defines caption for fieldset elements.  <datalist>: It is used to specify pre-defined list options for input controls.  <output>: It displays the output of performed calculations.  <option>: It is used to define options in a drop-down list.   <optgroup>: It is used to define group-related options in a drop-down list.       Here are some examples:  Type	Description <input type="text">	Displays a single-line text input field <input type="radio">	Displays a radio button (for selecting one of many choices) <input type="checkbox">	Displays a checkbox (for selecting zero or more of many choices) <input type="submit">	Displays a submit button (for submitting the form) <input type="button">	Displays a clickable button



An HTML form facilitates the user to enter data that is to be sent to the server for processing such as name, email address, password, phone number, etc.


Definition and Usage
The <form> tag is used to create an HTML form for user input.

The <form> element can contain one or more of the following form elements:

<input>
<textarea>
<button>
<select>
<option>
<optgroup>
<fieldset>
<label>
<output>


 Why use HTML Form?


 HTML forms are required if you want to collect some data from the site visitor. For example: If a user wants to purchase some items on the internet, he/she must fill out the form such as shipping address and credit/debit card details so that item can be sent to the given address.

The <form> Element

The HTML <form> element is used to create an HTML form for user input:


<form>
  <!--form elements-->
</form>


The <form> element is a container for different types of input elements, such as text fields, checkboxes, radio buttons, submit buttons, etc.


Form elements

These are the following HTML <form> elements:


<label>: It defines label for <form> elements.

<input>: It is used to get input data from the form in various types such as text, password, email, etc by changing its type.

<button>: It defines a clickable button to control other elements or execute a functionality.

<select>: It is used to create a drop-down list.

<textarea>: It is used to get input long text content.

<fieldset>: It is used to draw a box around other form elements and group the related data.

<legend>: It defines caption for fieldset elements.

<datalist>: It is used to specify pre-defined list options for input controls.

<output>: It displays the output of performed calculations.

<option>: It is used to define options in a drop-down list.

<optgroup>: It is used to define group-related options in a drop-down list.


 Here are some examples of form html:

TypeDescription
<input type="text">Displays a single-line text input field
<input type="radio">Displays a radio button (for selecting one of many choices)
<input type="checkbox">Displays a checkbox (for selecting zero or more of many choices)
<input type="submit">Displays a submit button (for submitting the form)
<input type="button">Displays a clickable button

Comments :

Post a Comment