Site icon TestingDocs.com

HTML Form GET and POST Methods

Overview

In HTML form, we can specify different HTTP methods for a form submission. The two main methods that we can specify are as follows:

Syntax

The transport method is specified in the form element, using the method attribute.

<form action=”target” method=”type”>

Method type can be GET or POST. The information is sent to the target page specified in the action attribute.

GET

To specify the GET method

<form action=”target” method=”GET”>

POST

To specify the POST method

<form action=”target” method=”POST”>

 

HTML Tutorials

HTML Tutorials on this website:

https://www.testingdocs.com/html-tutorials/

More Information on HTML:

https://www.w3.org/TR/html401/intro/intro.html

Exit mobile version