0
What is the difference between name and id in HTML
4 Answers
0
name is used in forms to access elements for label or dom manupulation.
0
name is generally used for form related elements
but id is a global attribute you can use it with all tags
0
You can't access directly an element using name value in css you have to goes through attributes name and value.
But with id you can
#id{
//Style
}
0
Sorry
Label works with id.
But form's element names make js dom manupulation much easier