The difference between a div and a span

I've interviewed what seems like an endless stream of web designers (emphasis on designers) over the last month or two, and they all seem to have one thing in common: they don't know what the hell they're talking about.

One of the technical questions I always ask and nobody ever answers correctly is, "What is the difference between a div and a span?"

Invariably, each candidate launches into a nervous, stuttering, uncertain description of how they use divs for certain things and spans for other things. When I ask why they use them for different things, the answer is always something along the lines of, "Um...I don't really know."

I had no idea that the level of basic HTML knowledge among people calling themselves web designers (and especially those calling themselves web developers, which is the position we're interviewing for) is so low. This is absolutely shocking to me. Some of the people I've interviewed have done very high-profile websites and have excellent design skills. The fact that they claim to know HTML without understanding this fundamental concept is surprising, absurd, and above all frustrating.

The difference between a div and a span is very simple. The HTML 4 specification has this to say on the subject (emphasis added):

The DIV and SPAN elements, in conjunction with the id and class attributes, offer a generic mechanism for adding structure to documents. These elements define content to be inline (SPAN) or block-level (DIV) but impose no other presentational idioms on the content. Thus, authors may use these elements in conjunction with style sheets, the lang attribute, etc., to tailor HTML to their own needs and tastes.

That's it. That's the answer. All I'm looking for are the words "inline" and "block-level". If you say those words in the correct order, you pass the test. A++++++, would hire again.

Of course, this is only one of the five or so technical questions that every candidate gets horribly wrong. Next time I'll write about the differences between absolute, relative, fixed, and static positioning in CSS.

Update: About an hour after posting this I interviewed another candidate over the phone and he aced all my questions. First time that's ever happened. I should have blogged about this sooner.