Difference between id, name and value attribute in HTML

Last Reply 7 months ago By dharmendr

Posted 7 months ago

Hi sir 

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

please explain me.


You are viewing reply posted by: dharmendr 7 months ago.
Posted 7 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.