Difference between id, name and value attribute in HTML

Last Reply 8 months ago By dharmendr

Posted 8 months ago

Hi sir 

what are the differnce between id, name, value for html controls

please explain me.


Posted 8 months ago

Hi sidu,

The id attribute specifies a unique id for an HTML element. The value must be unique within the HTML document.

The value attribute specifies the value of an <input> element.

The name attribute is used when sending data in a form submission.