0

What is the use of id and name in forming html 5 forms??

6th Jan 2017, 4:34 PM
AKki ShaRma
AKki ShaRma - avatar
2 odpowiedzi
+ 1
The ' id ' part of HTML, as far as I'm aware, is for the CSS portion of your website to locate a visual element and change it to specified perameters. The ' name ' attribute... I'm not quite sure. It could be, again, CSS - but it might be to do with naming conventions. So it can be displayed in the DOM, etc. :|
6th Jan 2017, 4:37 PM
ghostwalker13
ghostwalker13 - avatar
+ 1
The id attribute is for uniquely identifying any element (not just form elements). It must be unique throughout the entire document. The name attribute is used by form as the key in a key/value pair when submitting the form. The value attribute is both displayed in the browser, and submitted with the form.
6th Jan 2017, 4:51 PM
Saumya Saloni
Saumya Saloni - avatar