0
Difference between "id" and "name" attribute ?
2 Answers
+ 6
ID are uses to identify unique element in a web content...
NAME purpose is near the same, but with few differences:
+ In certain case it identify a set of elements (not unique) as for a set of 'radio' button (this is used to identify the group of single select only allowed)...
+ It was first designed to handle specifically <form> fields elements, as key name to identify values... It's always allowed for backwards compatibility, but with Html5 the 'id' is advised to be use/set instead (even with duplicating the value in the 'name' attribute)... except for grouping fields ^^
+ 1
ID is a unique element. That means that no other component can have the same ID as it.
(Sorry, I don't know how to explain name, all I know is that you use in php to make interactions between the user and the server easier)