• Tutorials Logic, IN
  • +91 8092939553
  • info@tutorialslogic.com

HTML Forms

Forms

Forms are one of the most important section of a HTML document, which contains controls such as text fields, password fields, checkboxes, radio buttons, button etc. It is required to collect different kinds of user inputs, such as name, email address, phone numbers, credit card information etc. We use the <form> tag to create a HTML form, and it uses various attributs, which are given below-

AttributsDescription
nameIt specifies a name, which is used to identify the form (access through DOM: document.forms.name).
actionIt specifies a url, which will tell where to submit the form (default: current page).
methodIt specifies the HTTP method used when sending the data to the server from the web client (default: GET).
targetIt specifies the target of the address or url in the action attribute (default: _self).
enctypeIt specifies the encoding of the submitted data through form (default: url-encoded).
										    
											<table>
											    <tr><th>Table Heading 1</th><th>Table Heading 2</th></tr>
												<tr><td>Data 1</td><td>Data 2</td></tr>
												<tr><td>Data 11</td><td>Data 22</td></tr>
											</table>
											
										

Form Elements

Form contains form elements, which has various types like text fields, checkboxes, radio buttons, submit buttons, and many more.

Text Fields:-

Password Field:-

Radio Buttons:-

Checkboxes:-

File Select box:-

Textarea:-

Select Boxes

Submit and Reset Buttons:-