what's the difference

R

RCS

Div tags do the same thing that span tags do - and they also add a carraige
return in the output.
 
K

Kevin Spencer

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.
 
K

Kevin Spencer

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.
 
R

RCS

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

checkbox databind 5
DataList1_ItemCommand event arguments 1
clip span content 3
div layout help 2
static vs appsession 3
what's the difference 3
Tab key inside div 5
Javascript question 6

Top