what's the difference

  • Thread starter Thread starter Guest
  • Start date Start date
Div tags do the same thing that span tags do - and they also add a carraige
return in the output.
 
Well, for one thing, they are spelled completely different! ;-)

The main difference is that a span is an inline element and a div is a block
element. Inline elements are displayed "in-line" with the surrounding
content. Block elements are displayed on their own line, below and/or above
any other content.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
Unfortunately, you're thanking the wrong guy. His answer is incorrect; mine
was correct. I wasn't going to say anything, but it sounds like you took him
at his word.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
You can lead a fish to a bicycle,
but it takes a very long time,
and the bicycle has to *want* to change.
 
I don't see you're response Kevin, but with all due respect - from your
snippy response, I assume you must've taken the the
technical-but-meaningless approach about how a div is a block? In HTML, just
about any technical "rule" is broken every day, so to try to be technical
with HTML is futile, IMHO.

For all intents and purposes, at least ANY intent or purpose I've ever
seen - what I described is really the only discernable difference between
the two. I was just answering in a practical sense.
 
Back
Top