+ 2

ID vs class (web)

When is the right time to use id and when do you use class. I mostly just use classes. I need some clarification on this.

19th Sep 2017, 5:20 AM
J. Le Roux
J. Le Roux - avatar
3 Answers
+ 1
Classes are mostly used for css and Id's are mostly used for JavaScripting. You can use both if you would like but then you might confuse yourself but a lot of html coders use it in that way to keep it nice and eligible to read. Its a preference. All up to you and how you want your code to look. :)
19th Sep 2017, 5:33 AM
Tristen Alexander Diaz
Tristen Alexander Diaz - avatar
0
thanks you so much man!
19th Sep 2017, 5:34 AM
J. Le Roux
J. Le Roux - avatar