I use 'id' a lot, I'm not sure if it even matters. But I hear about 'class' being used more for styling elements while 'id" is used for Javascripting; getElementById
I usually use ids as my "main building blocks" and class as a "modifyer" to an existing element, like if I want larger text to be used as titles for sections I'll make a class for it so when I'm coding in the HTML it's "p class=" if that makes sense
I mostly use 'id' also because I save THREE LETTERS OF DISK SPACE YEAHHHHHHH WOOOOOOOOOOOOOOOOOOO! "class" is five letters long compared to 'id' - (me who compresses and optimizes stuff way too much)
I use 'id' a lot, I'm not sure if it even matters. But I hear about 'class' being used more for styling elements while 'id" is used for Javascripting; getElementById
I think i just use classes and thats it, cuz i saw it on w3schools.
I use id if it's used once and class if it's used more than once
I usually use ids as my "main building blocks" and class as a "modifyer" to an existing element, like if I want larger text to be used as titles for sections I'll make a class for it so when I'm coding in the HTML it's "p class=" if that makes sense
It depends, if theres only one “something”, i’ll use id, otherwise its class
Using id is a bit easier for javascript as i dont need to add [0] at the end if i use class
Interesting stuff.... thanks you all! I do it for the same reason as most of you; multiple elements that're the same and need the same styles
I mostly use 'id' also because I save THREE LETTERS OF DISK SPACE YEAHHHHHHH WOOOOOOOOOOOOOOOOOOO! "class" is five letters long compared to 'id' - (me who compresses and optimizes stuff way too much)