3 ms·
Two things very wrong with your last suggestion: 1. total lack of semantic value - you cannot possibly get more meaningless than “span inside a div” there. It
by alanh 14y ago
Two things very wrong with your last suggestion:
1. total lack of semantic value - you cannot possibly get more meaningless than “span inside a div” there. It makes for extremely brittle CSS.
2. You should be using classes rather than elements in your selectors when possible, not only to make the code more maintainable and flexible, but also because it’s more performant (if you care).