In HTML, forms are used for gathering and sending user input to an external source (like a server) for processing. This is done with the <form> tag, which contains various labels and inputs.


The following example

<!DOCTYPE html>
<head> </head>
<form method="post" action="http://server1">
Enter your name:
<input type="text" name="fname" />
<br />
Enter your age:
<input type="text" name="age" />
<br />
<input type="submit" value="Submit" />


Interested in helping build Docs? Read the Contribution Guide or share your thoughts in this feedback form.

Learn HTML on Codecademy