Form: Name

To be submitted correctly, each input field must have a name attribute. When you apply the name attribute, it helps to store the information under that particular category at the server where the submitted input is sent to. This example will only submit the data from the "Last name" input field:

HTML file: Displayed by browser:
<form action="http://www.w3schools.com/html/action_page.php">
  First name:<br />
  <input type="text" value="Mickey">
  <br /><br />
  Last name:<br />
  <input type="text" name="lastname" value="Mouse">
  <br /><br />
  <input type="submit" value="Submit">
</form>
First name:


Last name:


In this case, "lastname" is the category that the input data will be filed under, at the server designated by the action attribute.

Back button Table of Contents Next button