Forms & Controls
method="post"
Sends form data in the HTTP request body using the chosen encoding. Suitable for many state-changing operations; HTTPS, server validation and CSRF protection are still necessary. Form submission method; formmethod on a submitter can override it. Missing or invalid method defaults to get. Non-dialog examples require a real server endpoint for meaningful submission.
Formal Syntax & Structure
html syntaxhtml
method="post"Parameters & Attributes
| Name | Type | Description |
|---|---|---|
| method | keyword | Sends form data in the HTTP request body using the chosen encoding. Suitable for many state-changing operations; HTTPS, server validation and CSRF protection are still necessary. |
Working Example
Example Snippethtml
<form method="post" action="/search"> <label> Query <input name="q"> </label> <button>Submit</button></form>