Forum Moderators: not2easy
A div is a block level element, whereas a span is an inline element.
Basically, think of a div as a conataining block. It can contain paragraphs and images etc. where a span works inline, that is, within an element like a div or paragraph tags, and is commonly used to style text.
Neither tag contains any real semantic value.
Check out the specs [w3.org] on block level and inline...
Thus <div>s may contain other <div>s and <div>s may contain <span>s. But <span>s may not contain <div>s.
Until that explanation I never properly understood what "inline" was supposed to mean.