RadicalBlur's Website

radicalblur.neocities.org

98,297 views
28 followers
3,219 updates
0 tips
Hi! 'div id="something"' or 'div class="something"'? What'dya think is best for putting a label on an element and styling it?
1 like
radicalblur's avatar radicalblur 9 hours ago

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

lemerks's avatar lemerks 9 hours ago

I think i just use classes and thats it, cuz i saw it on w3schools.

1 like
maxcrunch's avatar maxcrunch 8 hours ago

I use id if it's used once and class if it's used more than once

1 like
wackyworkbench's avatar wackyworkbench 8 hours ago

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

1 like
kiwimeowo's avatar kiwimeowo 6 hours ago

It depends, if theres only one “something”, i’ll use id, otherwise its class

kiwimeowo's avatar kiwimeowo 6 hours ago

Using id is a bit easier for javascript as i dont need to add [0] at the end if i use class

Website Stats

Last updated 13 hours ago
CreatedFeb 16, 2024
Site Traffic Stats

Tags

videogames webblog technology projects sonic