What is an HTML Form and Discuss different form attributes in Web Technology



Form is a data collection mechanism within HTML that allows the design of various styles of input to suit most types of information.

An input element can vary in many ways, depending on the type attribute. An input element can be of type text-field, checkbox, password, radio-button, submit button, and more.

Following are attributes of <form>.

1. Name : 

The name attribute specifies the name of a form which issued to reference elements in a JavaScript.

<form action="URL"> Value : URL Description : where to send the form data.

2. Action :

The required action attribute specifies where to send the form data when a form issubmitted.

<form action ="URL">Value : URL Description : where to send the form data.

3. Method : 

The method attribute specifies how to send form data.

<form method="get|post">
Value : get
Description : Default. Appends the form-data to the URL in name/value pairs:
URL?name=value&name=value
Value:post
Description : sends the form-data as an HTTP post transaction.

4. Target :

The target attribute specifies a name or a keyword that indicates where to display the response that is received after submitting the form.

<form target="_blank|_self|_parent|_top|framename">