What is the difference between GET and POST methods in an HTML form?

Both are values of the method attribute of a form.

PointGETPOST
Data goesIn the URLIn the body of the request
Visible to userYesNo
BookmarkPossibleNot possible
Size limitLimited by URL lengthMuch bigger
Use forSearch, filtersLogin, registration, file upload
<form action="search.php" method="get">...</form>
<form action="login.php" method="post">...</form>

Never send a password with GET, because it stays in the URL and the browser history. See HTML Forms.


Learn more about the similar topics:
Tutorials
HTML Input Types
HTML Forms
Exercises & Assignments
Write an HTML program to create a registration form
Write an HTML program to create a contact form
Interview Questions & Answers
What are the different new form element types in HTML5?
What is the difference between GET and POST methods in an HTML form?
What is the use of the label tag in HTML?