0

Difference between "id" and "name" attribute ?

18th Jul 2017, 9:31 PM
Murat
Murat - avatar
2 Réponses
+ 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 ^^
19th Jul 2017, 8:52 AM
visph
visph - avatar
+ 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)
18th Jul 2017, 9:44 PM
Limitless
Limitless - avatar