Computer Science, asked by kourtaranpreet5, 1 year ago

Difference bw id and name of form tag in html ?

Answers

Answered by rockstar24h
3
The ID of a form input element has nothing to do with the data contained within the element. IDs are for hooking the element with JavaScript and CSS. The name attribute, however, is used in the HTTP request sent by your browser to the server as a variable nameassociated with the data contained in the value attribute.



plz mark my answer brainliest

rockstar24h: if you got 2 answers please mark brainliest my answer to me
rockstar24h: if you got to answer please my brainliest to my answer
Answered by tejasgupta
1

Hi. ID attribute of HTML tags is used in  CSS or JS to make the element stylish and responsive. The name attribute, however, is used in the HTTP request sent by your browser to the server as a variable name associated with the data contained in the value attribute. That's the only difference between ID and NAME attribute of HTML tags. Hope it helps!

Similar questions