+ 1

What is the use of id

7th Mar 2018, 12:29 PM
aryansingh suryavanshi
aryansingh suryavanshi - avatar
2 Respostas
+ 4
You can specify a unique ID to most HTML tags to make them easily accessible in CSS and JS. If you gave your tags an ID, you can point a styling rule to that specific tag to only style that element, or be able to reference them in Javascript when they need to be modified.
7th Mar 2018, 12:33 PM
apex137
apex137 - avatar
+ 1
Yeah, they be can said as a unique address to each HTML element. It makes document manipulation through JQuery or JavaScript really easy if you have a defined ID for that.
7th Mar 2018, 12:43 PM
Aaron Stone
Aaron Stone - avatar