Forms & Controls

method="post"

Build a form with the HTML form generator

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

NameTypeDescription
methodkeywordSends 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>
HTML Reference