- 1st Choice
- 2nd Choice
- 3rd Choice
The Low Down
name attribute defines the name of the form control, and is submitted along with the form control’s value when the form is submitted. It is the name part of the name/value pair associated with an element for the purposes of form submission.
- The value of the
nameattribute can’t be an empty string, and should be unique, except in the case of
radio, use the same name for all of the radio buttons in each group of radio buttons: only one radio button in a group of same named radio buttons can be selected at a time.
- Though by no means required, you can give a group of checkboxes the same name, though each should have a different value.
- Valid for all input types, and all other form controls. In addition to
<input>, it is also valid on
- When it comes to maps, the
nameattribute is how the
<map>can be referenced.
nameattribute is required on
nameattribute on links and images is now obsolete. Use
nameattribute was also valid on applets and frames, which are now obsolete.