HTML Forms

HTML Forms gives a way to web developers to collect the information from the visitors. HTML Forms can collect input from the visitors and pass it to the server using the server side scripting languages like- php,asp etc.

You must be familiar to some common forms available on the websites. Example – Registration form, Contact Us form, Inquiry Form etc.

HTML Form supports various input elements to take the input from the visitor like text fields, textarea fields, drop-down menus, radio buttons, checkboxes, etc.

HTML Form is defined using the <form></form> tags. The actual input elements are placed in between these two tags.

Form Attributes

Attribute Value
name This attribute specifies the name of the form.
action This attribute specifies the path of the script where the collected information will be submitted.
method This attribute specifies method by which data will be passed to server. Example -GET and POST
enctype This attribute species encryption type for the data before it is passed to the server.