Q: Why do I have to type both the id AND name attributes in forms?
A: Technically (although the 3rd edition of the textbook says you do), you don't. You can use only id.
A: Technically (although the 3rd edition of the textbook says you do), you don't. You can use only id.
- The name attribute specifies the name of a form.
- The name attribute of the form element provides a way to reference the form in a script.