Is there any difference in using non-capticalized "post" or capitalized "POST" in <form>
action method? I just want to strictly follow W3C HTML specification.
This is no difference when running in modern browsers, though.
The method attribute specifies how to send form-data (the form-data is sent to the page specified in the action attribute). The form-data can be sent as URL variables (with method="get" ) or as HTTP post transaction (with method="post" ). Notes on GET: Appends form-data into the URL in name/value pairs.
POST: In the post method, after the submission of the form, the form values will not be visible in the address bar of the new browser tab as it was visible in the GET method. It appends form data inside the body of the HTTP request. It has no size limitation. This method does not support bookmark the result.
The HTML form action attribute states the URL that will process the contents of a form. You should make sure the web resource to which the action attribute points accepts whatever method you have specified in your “method” attribute. The action attribute appears between our opening <form> tag.
Let's learn the steps of performing multiple actions with multiple buttons in a single HTML form: Create a form with method 'post' and set the value of the action attribute to a default URL where you want to send the form data. Create the input fields inside the as per your concern. Create a button with type submit.
From the w3c docs for forms:
Possible (case-insensitive) values are "get" (the default) and "post".
No difference! I always use lower case.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With