0

What is the use of id

<form> <label>Your name:</label> <input id="user" name="username" type="text" /> </form>

25th Jan 2018, 7:51 AM
Md Nisu Ahmad
Md Nisu Ahmad - avatar
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.
25th Jan 2018, 8:18 AM
Amethyst Animion
Amethyst Animion - avatar
+ 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.
25th Jan 2018, 8:00 AM
Vitaliy Angelov (Rostov-on-Don)
Vitaliy Angelov (Rostov-on-Don) - avatar
+ 1
it's better understand in css
25th Jan 2018, 8:32 AM
Md Nisu Ahmad
Md Nisu Ahmad - avatar