element can represent many different types of input. I would expect a SO answer to contain some semantic info regarding the difference between id and name, when to use each one, etc. The ID of a form input element has nothing to do with the data contained within the element. By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy. However, in some cases, particularly form fields (