8 ms·
Do they have any other purpose besides CSS though? They were even hard to use as selectors in JS until querySelector appeared.
by nicbou 2y ago
Do they have any other purpose besides CSS though? They were even hard to use as selectors in JS until querySelector appeared.
- cxr 2y agoI'm not sure you're grokking what I'm saying. The answer to your question is "yes, of course". The class attribute has _nothing_ to do with CSS (or JS). The CSS people didn't give us the class attribute (and the HTML people didn't put it in so that we could use CSS better). HTML had class attributes before CSS or JS ever existed.