← CodePrimer
HTML
Beginner
Forms
GET vs POST forms
When should a form use GET or POST?
Method choice for forms.
<form action="/search.php" method="get">
<input type="search" name="q">
<button type="submit">Search</button>
</form>
<form action="/login.php" method="post">
<input type="email" name="email">
<input type="password" name="password">
<button type="submit">Log in</button>
</form>
Notes
GET is shareable (search). POST for login/create/update.
Keywords: get · post · method · form
Related
HTML
HTML headings h1–h6
How do I create page headings?
HTML
Paragraphs and line breaks
How do I break text into paragraphs?
HTML
Hyperlinks with href
How do I make a clickable link?
HTML
Ordered and unordered lists
How do I make bullet or numbered lists?
HTML
HTML table structure
How do I display tabular data?
HTML
Image with alt text
How do I insert an image accessibly?