HTML Form Method
Predict Output Easy
Question
What HTTP method does this form use?
Code
<form action="/submit" method="post">
<input name="email">
</form>
Hint
The method attribute specifies the HTTP verb.
Explanation
The method="post" attribute makes the form submit using an HTTP POST request to /submit. The form data is sent in the request body. If method were "get" (the default), data would be appended to the URL as query parameters. POST is preferred for sensitive data as it does not appear in the URL.
Related Resources
Related Lessons
- HTML Forms
Learn HTML forms.
Look up unfamiliar terms
A beginner-friendly glossary explains jargon in plain English — variables, functions, DOM, Promise, and more.
Decode error messages
Plain-English explanations of common errors — what they mean, why they happen, and how to fix them.
Build real projects
Apply what you learned by building guided projects with starter code and solutions.