Well, not exactly the same, but yes, almost. Both are elements of a document, but <div>is a block element and <span> is an inline element. And what is block and inline? Block elements take the whole section of a page, at least a whole full line, but inline will use as little space as possible, just like filling a gap.
DIV
I am <div>a</div>boy.
will produce
I am
a
boy.yet,SPAN
I am <span>a</span> boy
will produce
I am a boy.
So, can you see the differences now?
1 comment:
yes, i can :)
Post a Comment