Name attribute & Id attribute

Little confused on what the difference is between “name” attribute and the “id” is? My guess is that the name attribute is used to be recognized on the server side of things and the ID attribute is to be used for your own coding references, like linking CSS to the ID? Not sure :person_shrugging:

1 Like

Hi there and welcome. id attribute is a unique identifier for an HTML element, used for CSS styling, JavaScript manipulation, or anchors.
name attribute is used to identify form elements for data submission, can be shared by multiple elements.

2 Likes