0
What is the use of id
<form> <label>Your name:</label> <input id="user" name="username" type="text" /> </form>
3 Answers
+ 11
ID is identity of a tag and it should be used once in a document.
the ID must be an unique name. most used for changing its style from CSS and/or JS or modifying its data via JS.
+ 5
id - Specifies the style ID â unique element name that is used to change its style and refer to it via scripts. ID in the document code should be in one piece, in other words, to meet only once.
+ 1
it's better understand in css