SPAN vs DIV (inline-block)
css, html
Solution
According to the HTML spec, `<span>` is an inline element and `<div>` is a block element. Now that can be changed using the `display` CSS property but there is one issue: in terms of HTML validation, you can't put block elements inside inline elements so:
<p>...<div>foo</div>...</p>
is not strictly valid even if you change the `<div>` to `inline` or `inline-block`.
So, if your element is `inline` or `inline-block` use a `<span>`. If it's a `block` level element, use a `<div>`.
Problem
Is there any reason to use a `<div style="display:inline-block">` instead of a `<span>` to layout a webpage? Can I put content nested inside the span? What is valid and what isn't? It's ok to use this to make a 3x2 table like layout? ``` <div> <span> content1(divs,p, spans, etc) </span> <span> content2(divs,p, spans, etc) </span> <span> content3(divs,p, spans, etc) </span> </div> <div> <span> content4(divs,p, spans, etc) </span> <span> content5(divs,p, spans, etc) </span> <span> content6(divs,p, spans, etc) </span> </div> ```