1.

Explain action and method attributes in <form> tags.

Answer»

In HTML, the <form> tag can be used to create a form for taking USER input. <form> tags have various ATTRIBUTES.  

The action attribute is used to specify where to send the DATA entered in the form after the form is submitted by clicking the Submit button. Usually, the data is sent to the server.  

The method attribute SPECIFIES the HTTP method that should be used when sending the data in the form to the location specified in the action attribute. The DEFAULT HTTP method used to submit the form data is GET. The form data can be sent either by GET or POST. If GET is specified, the data will be sent as URL variables. If POST is specified, the data will be sent in the request body.



Discussion

No Comment Found