Hacker News new | ask | show | jobs
by shardinator 3020 days ago
Interesting, I'm the other way around, I've defaulted to classes and then found that Ids would be more appropriate in many cases.

My simple rule for id vs class (as a non-expert) is if you say 'this is the x' e.g. 'this is the footer/header/navigation-panel' then it's an Id, if you would say 'this is a y' e.g. 'this the a product/list-item/image' then it's a class.