When to use DIV or SPAN and CLASS or ID
I've been using CSS for a while, but just recently I was thinking more about it and I realized I don't know something that maybe central to CSS.
When to use DIV instead of SPAN and when to use CLASS instead of ID.
Any ideas? I know DIV throws the extra return in there, and ID is useful when using the DOM, but is there any other real distinction?
Like for this code below, I'm trying to design the site without tables since it is an intranet site and I realized, should those SPANs be DIVs or vice versa? What about those classes, should they be IDs. Any ideas?
<span class="spacer"> </span>
<span class="subtitle">Sub title</span>
<div class="spacer"> </div>