Form tag in HTML

Hello Readers,

In HTML form tag <form> is used to send the request to the server or for taking user input. The main purpose of the form tag is to handle the data. Everytime we interact with the server, or vice versa, the form tag is responsible for the communication between the two ends. Form tag holds the data from one end and transfers it to another end. If in html, user wants to navigate from one page to another with the current status to be saved or to submit some information or data onto another page then form tag is helpful.

Various attributes can be associated with the form tag. following are some of them.

1) Required Attributes.

The action attribute is the required attribute for any form tag. This attribute tells the form tag, where to navigate or save the contents when action is taken. Here action may differ from the requirement. For example in case where form tag uses submit button then action will be taken when this button is clicked.

2) Optional Attributes:

Following are some of the optional attributes.

3) Standard Attributes.

4)Event Attributes.

Hope this tutorial will help you understand the form tag more clearly.

Thanks,

Nikhil Naoghare.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.